mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-13 00:24:44 +00:00
SDL_WINDOW_FULLSCREEN_DESKTOP implies SDL_WINDOW_FULLSCREEN.
The docs "forget" to mention that. So it's not enough to check for SDL_WINDOW_FULLSCREEN alone, we would trigger the code intented for the real fullscreen if we're switching to / running in fullscreen desktop mode. Add and addition check that SDL_WINDOW_FULLSCREEN_DESKTOP isn't set. This may fix issue #484.
This commit is contained in:
parent
78bf3eeebf
commit
fed2e142f5
1 changed files with 8 additions and 4 deletions
|
@ -108,7 +108,9 @@ CreateSDLWindow(int flags, int w, int h)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & SDL_WINDOW_FULLSCREEN) && ((real_mode.w != w) || (real_mode.h != h)))
|
/* SDL_WINDOW_FULLSCREEN_DESKTOP implies SDL_WINDOW_FULLSCREEN! */
|
||||||
|
if (((flags & SDL_WINDOW_FULLSCREEN) && (~flags & SDL_WINDOW_FULLSCREEN_DESKTOP))
|
||||||
|
&& ((real_mode.w != w) || (real_mode.h != h)))
|
||||||
{
|
{
|
||||||
|
|
||||||
Com_Printf("Current display mode isn't requested display mode\n");
|
Com_Printf("Current display mode isn't requested display mode\n");
|
||||||
|
@ -157,9 +159,11 @@ CreateSDLWindow(int flags, int w, int h)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normally SDL stays at desktop refresh rate or chooses
|
/* Normally SDL stays at desktop refresh rate or chooses something
|
||||||
something sane. Some player may want to override that. */
|
sane. Some player may want to override that.
|
||||||
if (flags & SDL_WINDOW_FULLSCREEN)
|
|
||||||
|
Reminder: SDL_WINDOW_FULLSCREEN_DESKTOP implies SDL_WINDOW_FULLSCREEN! */
|
||||||
|
if ((flags & SDL_WINDOW_FULLSCREEN) && (~flags & SDL_WINDOW_FULLSCREEN_DESKTOP))
|
||||||
{
|
{
|
||||||
if (vid_rate->value > 0)
|
if (vid_rate->value > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue