mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +00:00
Only set SDL 1.2 fullscreen if it's requested.
This commit is contained in:
parent
908fd30148
commit
5e61c23fd8
1 changed files with 4 additions and 4 deletions
|
@ -237,18 +237,18 @@ GLimp_InitGraphics(int fullscreen, int *pwidth, int *pheight)
|
||||||
int curWidth, curHeight;
|
int curWidth, curHeight;
|
||||||
int width = *pwidth;
|
int width = *pwidth;
|
||||||
int height = *pheight;
|
int height = *pheight;
|
||||||
unsigned int fs_flag;
|
unsigned int fs_flag = 0;
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
if (fullscreen == 1) {
|
if (fullscreen == 1) {
|
||||||
fs_flag = SDL_WINDOW_FULLSCREEN_DESKTOP;
|
fs_flag = SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
} else if (fullscreen == 2) {
|
} else if (fullscreen == 2) {
|
||||||
fs_flag = SDL_WINDOW_FULLSCREEN;
|
fs_flag = SDL_WINDOW_FULLSCREEN;
|
||||||
} else {
|
|
||||||
fs_flag = 0;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
fs_flag = SDL_FULLSCREEN;
|
if (fullscreen) {
|
||||||
|
fs_flag = SDL_FULLSCREEN;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (GetWindowSize(&curWidth, &curHeight) && (curWidth == width) && (curHeight == height))
|
if (GetWindowSize(&curWidth, &curHeight) && (curWidth == width) && (curHeight == height))
|
||||||
|
|
Loading…
Reference in a new issue