New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating fullscreen window with higher resolution than desktop broken #3313
Comments
I have investigated this a bit (I'll eventually create a PR for at least those issues I can fix) and discovered even more issues:
Does anyone know if this behavior of |
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
.. and maybe other platforms as well (though X11 was not affected)? The issue was that passing a higher resolution than the current desktop resolution to SDL_CreateWindow() with SDL_WINDOW_FULLSCREEN didn't switch to that resolution (even though it did switch to lower resolutions). When creating a fullscreen window, window->fullscreen wasn't even set at all (only zeroed out), setting it only happened if the user explicitly called SDL_SetWindowDisplayMode(). So without that, SDL_CreateWindow() -> SDL_UpdateFullscreenMode() -> SDL_GetWindowDisplayMode() used the resolution from window->windowed.w/h which were limited to the desktop size due to some weird combination of WIN_AdjustWindowRectWithStyle() and WIN_WindowProc() being called after a call to SetWindowPos(). fixes libsdl-org#3313
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
Otherwise only the display resolution is changed, but the SDL window size (and for example the window-surface size) aren't adjusted accordingly and thus don't fill the whole screen. See libsdl-org#3313
#4392 has fixes for the aforementioned issues. |
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
.. and maybe other platforms as well (though X11 was not affected)? The issue was that passing a higher resolution than the current desktop resolution to SDL_CreateWindow() with SDL_WINDOW_FULLSCREEN didn't switch to that resolution (even though it did switch to lower resolutions). When creating a fullscreen window, window->fullscreen wasn't even set at all (only zeroed out), setting it only happened if the user explicitly called SDL_SetWindowDisplayMode(). So without that, SDL_CreateWindow() -> SDL_UpdateFullscreenMode() -> SDL_GetWindowDisplayMode() used the resolution from window->windowed.w/h which were limited to the desktop size due to some weird combination of WIN_AdjustWindowRectWithStyle() and WIN_WindowProc() being called after a call to SetWindowPos(). fixes libsdl-org#3313
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
Otherwise only the display resolution is changed, but the SDL window size (and for example the window-surface size) aren't adjusted accordingly and thus don't fill the whole screen. See libsdl-org#3313
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
.. and maybe other platforms as well (though X11 was not affected)? The issue was that passing a higher resolution than the current desktop resolution to SDL_CreateWindow() with SDL_WINDOW_FULLSCREEN didn't switch to that resolution (even though it did switch to lower resolutions). When creating a fullscreen window, window->fullscreen wasn't even set at all (only zeroed out), setting it only happened if the user explicitly called SDL_SetWindowDisplayMode(). So without that, SDL_CreateWindow() -> SDL_UpdateFullscreenMode() -> SDL_GetWindowDisplayMode() used the resolution from window->windowed.w/h which were limited to the desktop size due to some weird combination of WIN_AdjustWindowRectWithStyle() and WIN_WindowProc() being called after a call to SetWindowPos(). fixes libsdl-org#3313
DanielGibson
added a commit
to DanielGibson/SDL
that referenced
this issue
May 21, 2021
Otherwise only the display resolution is changed, but the SDL window size (and for example the window-surface size) aren't adjusted accordingly and thus don't fill the whole screen. See libsdl-org#3313
slouken
pushed a commit
that referenced
this issue
Aug 4, 2021
.. and maybe other platforms as well (though X11 was not affected)? The issue was that passing a higher resolution than the current desktop resolution to SDL_CreateWindow() with SDL_WINDOW_FULLSCREEN didn't switch to that resolution (even though it did switch to lower resolutions). When creating a fullscreen window, window->fullscreen wasn't even set at all (only zeroed out), setting it only happened if the user explicitly called SDL_SetWindowDisplayMode(). So without that, SDL_CreateWindow() -> SDL_UpdateFullscreenMode() -> SDL_GetWindowDisplayMode() used the resolution from window->windowed.w/h which were limited to the desktop size due to some weird combination of WIN_AdjustWindowRectWithStyle() and WIN_WindowProc() being called after a call to SetWindowPos(). fixes #3313
slouken
pushed a commit
that referenced
this issue
Aug 4, 2021
Otherwise only the display resolution is changed, but the SDL window size (and for example the window-surface size) aren't adjusted accordingly and thus don't fill the whole screen. See #3313
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.10
Reported for operating system, platform: Windows (All), x86_64
Comments on the original bug report:
On 2019-06-30 02:35:45 +0000, Daniel Gibson wrote:
On 2019-06-30 02:36:44 +0000, Daniel Gibson wrote:
On 2019-06-30 03:10:24 +0000, Daniel Gibson wrote:
On 2019-07-02 23:23:48 +0000, Daniel Gibson wrote:
On 2019-07-03 06:52:13 +0000, Cameron Gutman wrote:
On 2019-07-03 21:06:34 +0000, Daniel Gibson wrote:
On 2019-07-30 17:49:38 +0000, Ryan C. Gordon wrote:
On 2019-09-20 20:47:39 +0000, Ryan C. Gordon wrote:
On 2019-09-20 20:48:41 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: