mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Fix gl_swapinterval
This commit is contained in:
parent
74f19d5962
commit
687ca61dfa
4 changed files with 7 additions and 17 deletions
|
@ -229,10 +229,15 @@ GLimp_InitGraphics(qboolean fullscreen)
|
|||
/* Set the icon */
|
||||
SetSDLIcon();
|
||||
|
||||
/* Enable vsync */
|
||||
if (gl_swapinterval->value)
|
||||
{
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
if ((surface =
|
||||
SDL_SetVideoMode(vid.width, vid.height, 0, flags)) == NULL)
|
||||
if ((surface = SDL_SetVideoMode(vid.width, vid.height, 0, flags)) == NULL)
|
||||
{
|
||||
if (counter == 1)
|
||||
{
|
||||
|
|
|
@ -148,7 +148,6 @@ void GL_BeginRendering(int *x, int *y, int *width, int *height);
|
|||
void GL_EndRendering(void);
|
||||
|
||||
void R_SetDefaultState(void);
|
||||
void R_UpdateSwapInterval(void);
|
||||
|
||||
extern float gldepthmin, gldepthmax;
|
||||
|
||||
|
|
|
@ -1464,9 +1464,6 @@ R_BeginFrame(float camera_separation)
|
|||
gl_texturesolidmode->modified = false;
|
||||
}
|
||||
|
||||
/* swapinterval stuff */
|
||||
R_UpdateSwapInterval();
|
||||
|
||||
/* clear screen if desired */
|
||||
R_Clear();
|
||||
}
|
||||
|
|
|
@ -219,16 +219,5 @@ R_SetDefaultState(void)
|
|||
|
||||
R_SetTexturePalette(d_8to24table);
|
||||
}
|
||||
|
||||
R_UpdateSwapInterval();
|
||||
}
|
||||
|
||||
void
|
||||
R_UpdateSwapInterval(void)
|
||||
{
|
||||
if (gl_swapinterval->modified)
|
||||
{
|
||||
gl_swapinterval->modified = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue