smol cleanup for downsample stuff
This commit is contained in:
1 parent
54d897fc33
commit
5b480be6dc
2 files changed
+14
-18
No files matched your search
+14
-15
@@ -277,6 +277,9 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen, SDL_bool
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
#ifdef USE_FBO_OGL
|
||||
I_DownSample();
|
||||
#endif
|
||||
OglSdlSurface(vid.width, vid.height);
|
||||
}
|
||||
#endif
|
||||
@@ -751,7 +754,7 @@ static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which)
|
||||
#ifdef USE_FBO_OGL
|
||||
void I_DownSample(void)
|
||||
{
|
||||
if (!cv_grframebuffer.value || !(rendermode == render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it
|
||||
if (!cv_grframebuffer.value || !supportFBO) //no sense to do this crap if we cant benefit from it
|
||||
{
|
||||
downsample = false;
|
||||
return;
|
||||
@@ -760,18 +763,19 @@ void I_DownSample(void)
|
||||
int currentDisplayIndex = SDL_GetWindowDisplayIndex(window);
|
||||
SDL_DisplayMode curmode;
|
||||
|
||||
if (SDL_GetCurrentDisplayMode(currentDisplayIndex, &curmode) == 0)
|
||||
if (SDL_GetCurrentDisplayMode(currentDisplayIndex, &curmode) != 0)
|
||||
{
|
||||
if ((vid.width > curmode.w) || (vid.height > curmode.h)) //check if current resolution is higher than current display resolution
|
||||
{
|
||||
downsample = true;
|
||||
RefreshOGLSDLSurface();
|
||||
}
|
||||
else
|
||||
downsample = false; // its not so no need to do crap
|
||||
downsample = false; // couldnt get display info so turn the thing off
|
||||
return;
|
||||
}
|
||||
|
||||
if ((vid.width > curmode.w) || (vid.height > curmode.h)) //check if current resolution is higher than current display resolution
|
||||
{
|
||||
downsample = true;
|
||||
RefreshOGLSDLSurface();
|
||||
}
|
||||
else
|
||||
downsample = false; // couldnt get display info so turn the thing off
|
||||
downsample = false; // its not so no need to do crap
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1939,11 +1943,6 @@ INT32 VID_SetMode(INT32 modeNum)
|
||||
}
|
||||
//Impl_SetWindowName("SRB2Kart "VERSIONSTRING);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
if (rendermode == render_opengl)
|
||||
I_DownSample();
|
||||
#endif
|
||||
|
||||
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (setmodeneeded ? SDL_TRUE : SDL_FALSE));
|
||||
Impl_VideoSetupBuffer();
|
||||
|
||||
|
||||
@@ -166,9 +166,6 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
maximumAnisotropy = 1;
|
||||
|
||||
granisotropicmode_cons_t[1].value = maximumAnisotropy;
|
||||
#ifdef USE_FBO_OGL
|
||||
I_DownSample();
|
||||
#endif
|
||||
}
|
||||
first_init = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user