mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-19 07:51:03 +00:00
Limit the work around against wrong resolutions to fullscreen.
When Q2 runs in windowed mode, SDL can never switch to the wrong the resolution. The resolution isn't switched, of course. The work around prevented Q2 from creating Windows larger than the resolution of the primary display. For example a primary display of 1280x1024 prevented a window size of 1680x1050 on the much bigger secondary display.
This commit is contained in:
parent
dfaf33e478
commit
0a159eefb2
1 changed files with 8 additions and 5 deletions
13
src/client/vid/glimp_sdl.c
Normal file → Executable file
13
src/client/vid/glimp_sdl.c
Normal file → Executable file
|
@ -104,14 +104,17 @@ CreateSDLWindow(int flags, int w, int h)
|
|||
https://bugzilla.libsdl.org/show_bug.cgi?id=4700 */
|
||||
SDL_DisplayMode real_mode;
|
||||
|
||||
if (SDL_GetWindowDisplayMode(window, &real_mode) != 0)
|
||||
if ((flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP)) == SDL_WINDOW_FULLSCREEN)
|
||||
{
|
||||
SDL_DestroyWindow(window);
|
||||
window = NULL;
|
||||
if (SDL_GetWindowDisplayMode(window, &real_mode) != 0)
|
||||
{
|
||||
SDL_DestroyWindow(window);
|
||||
window = NULL;
|
||||
|
||||
Com_Printf("Can't get display mode: %s\n", SDL_GetError());
|
||||
Com_Printf("Can't get display mode: %s\n", SDL_GetError());
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* SDL_WINDOW_FULLSCREEN_DESKTOP implies SDL_WINDOW_FULLSCREEN! */
|
||||
|
|
Loading…
Reference in a new issue