mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
sdl2: limit fullscreen resolution in OpenGL
This commit is contained in:
parent
8890722223
commit
005b502756
1 changed files with 9 additions and 8 deletions
|
|
@ -185,14 +185,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||||
{
|
{
|
||||||
wasfullscreen = SDL_TRUE;
|
wasfullscreen = SDL_TRUE;
|
||||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
// Logical fullscreen is not implemented yet for OpenGL, so...
|
|
||||||
// Special case handling
|
|
||||||
if (rendermode == render_opengl)
|
|
||||||
{
|
|
||||||
int sdlw, sdlh;
|
|
||||||
SDL_GetWindowSize(window, &sdlw, &sdlh);
|
|
||||||
VID_SetMode(VID_GetModeForSize(sdlw, sdlh));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!fullscreen && wasfullscreen)
|
else if (!fullscreen && wasfullscreen)
|
||||||
{
|
{
|
||||||
|
|
@ -217,6 +209,15 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||||
|
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
{
|
{
|
||||||
|
int sdlw, sdlh;
|
||||||
|
SDL_GetWindowSize(window, &sdlw, &sdlh);
|
||||||
|
// Logical fullscreen is not implemented yet for OpenGL, so...
|
||||||
|
// Special case handling
|
||||||
|
if (USE_FULLSCREEN && width != sdlw && height != sdlh)
|
||||||
|
{
|
||||||
|
VID_SetMode(VID_GetModeForSize(sdlw, sdlh));
|
||||||
|
return;
|
||||||
|
}
|
||||||
OglSdlSurface(vid.width, vid.height);
|
OglSdlSurface(vid.width, vid.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue