dont always call HWR_Startup again
This commit is contained in:
1 parent
506dc2455a
commit
b4e1be5bee
1 file changed
+6
-3
+6
-3
@@ -112,10 +112,11 @@ boolean LoadGL(void)
|
||||
|
||||
\return if true, changed video mode
|
||||
*/
|
||||
static boolean first_init = false;
|
||||
|
||||
boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
{
|
||||
INT32 cbpp = cv_scr_depth.value < 16 ? 16 : cv_scr_depth.value;
|
||||
static boolean first_init = false;
|
||||
const char *gllogdir = NULL;
|
||||
|
||||
oglflags = 0;
|
||||
@@ -180,7 +181,6 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
first_init = true;
|
||||
|
||||
SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0);
|
||||
|
||||
@@ -214,9 +214,12 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
GLFramebuffer_Disable();
|
||||
#endif
|
||||
|
||||
HWR_Startup();
|
||||
if (!first_init)
|
||||
HWR_Startup();
|
||||
textureformatGL = cbpp > 16 ? GL_RGBA : GL_RGB5_A1;
|
||||
|
||||
first_init = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user