Skip to content

Window adjustments and fixes for all backends#234

Draft
AloXado320 wants to merge 8 commits into
ButterscotchRunner:mainfrom
AloXado320:backend_upd
Draft

Window adjustments and fixes for all backends#234
AloXado320 wants to merge 8 commits into
ButterscotchRunner:mainfrom
AloXado320:backend_upd

Conversation

@AloXado320

@AloXado320 AloXado320 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Main changes for all backends

  • Adjust window position and size if a game requests a larger resolution than the current resolution.
  • When window size it's changed, it now gets centered if is not maximized and caches the size so it doesn't prevent resize.
  • WIN32 time commands are now set in GLFW backends, no need to set on SDL backends since they already do internally.

Specific backend changes

GLFW2

  • Fixed cursor being locked on Windows when it's invisible.
  • Fixed sleep to prevent negative values (Viral Nightmare was affected by it, not other games for some reason).

SDL1

  • Added alternative way to get max resolution on very old versions (GCC 2.95/3.0 requires it).
  • Made it so Alt+F4 actually closes the window.

SDL3

  • Ported over HIDPI changes from SDL2.
  • Adjusted window Y position so on larger resolutions, the title bar is still visible.

Description

  • Fixes MMX Viral Nightmare, Shotgun Witch and probably other games from setting a larger resolution.
  • Fixes Orbinaut Framework games (eg: Sonic Revisited) setting a large then a small resolution, hiding the title bar.
  • Fixes CD-I Remasters from setting the windows size every frame, making them unresizable.

Comment thread src/desktop/backends/sdl1.c Outdated
Comment thread src/desktop/backends/sdl1.c Outdated
Comment thread src/desktop/platformdefs.h Outdated
Comment thread src/desktop/backends/glfw2.c Outdated
AloXado320 and others added 6 commits June 16, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants