Fixes for fullscreen mode #4392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SDL_CreateWindow() with SDL_WINDOW_FULLSCREEN didn't work on Windows if resolution is higher than desktop resolution.
SDL_SetWindowDisplayMode() on a fullscreen window switches the display resolution, but didn't set
window->wandwindow->hand doesn't adjust the size of the window-surface either.Description
Setting
window->fullscreen.wand.hto a resolution as close as possible to the requested one (using SDL_GetClosestDisplayModeForDisplay()) in SDL_CreateWindow() (if called with SDL_WINDOW_FULLSCREEN) fixes the first issue.The second issue is fixed by setting
window->wand->hand after setting the new display mode in SDL_SetWindowDisplayMode(), and then calling SDL_OnWindowResized() to make sure it's applied.(I hope this is the correct/best way?)
Existing Issue(s)
Fixes #3313