Fix SDL3 display modes and window scaling#3671
Conversation
|
Updated to store the display index in config and resolve the SDL display ID at runtime. |
|
Removed the VS 2026 preset changes from this PR so it stays focused on the SDL3 display fix. |
|
The code seems alright, there are some things I like to change but I can do them after the PR, ideally some people test this before we merge it. |
|
Had a play on a CI release artefact, looks good 👍
Maybe worth a changelog? |
LeftofZen
left a comment
There was a problem hiding this comment.
I didn't have any issues with this, but needs some testing by a mac/linux user
|
Works fine on macOS. Fullscreen setting is not saved, as expected. Reminded me that the screen mode dropdown in the options window is not disabled on macOS, which is a relatively recent regression. (Does not need addressing in this PR, though.) Will test Linux (Wayland) in a bit. |
|
Linux / Wayland appears to be working fine as well. Nice work! Perhaps we could add a changelog entry or two for the user-facing changes? |
|
I think "clamp invalid monitor-sized windowed resolutions back to a sane window size" warrants a changelog entry as well. That was plaguing our SDL2 setup just as well. |
Summary
This fixes several regressions introduced during the SDL3 migration around display mode switching, startup resolution handling, and window scaling.
Changes
2xwindow scaling by using nearest filtering on the primary software-rendered textureNotes
A few of these bugs compounded with each other, which made the behavior feel inconsistent in practice:
window_resolutionTesting
cmake --preset windows-vs2026cmake --build --preset windows-vs2026-release2xscaling on1440p