mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Rename vsync_render and "sdl_vsync" to vsync_renderlayer. An "sdl_" prefix should be used sparingly.
git-svn-id: https://svn.eduke32.com/eduke32@5953 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e258ca51f8
commit
158fcb5e01
3 changed files with 17 additions and 17 deletions
|
@ -104,7 +104,7 @@ static uint16_t sysgamma[3][256];
|
|||
// OpenGL stuff
|
||||
char nogl=0;
|
||||
#endif
|
||||
static int sdl_vsync=0;
|
||||
static int vsync_renderlayer;
|
||||
int32_t maxrefreshfreq=0;
|
||||
|
||||
// last gamma, contrast, brightness
|
||||
|
@ -504,7 +504,7 @@ int setvsync(int newSync);
|
|||
#if SDL_MAJOR_VERSION != 1
|
||||
int setvsync(int newSync)
|
||||
{
|
||||
if (sdl_vsync == newSync)
|
||||
if (vsync_renderlayer == newSync)
|
||||
return newSync;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
@ -527,19 +527,19 @@ int setvsync(int newSync)
|
|||
}
|
||||
}
|
||||
|
||||
sdl_vsync = newSync;
|
||||
vsync_renderlayer = newSync;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
sdl_vsync = newSync;
|
||||
vsync_renderlayer = newSync;
|
||||
|
||||
resetvideomode();
|
||||
if (setgamemode(fullscreen, xdim, ydim, bpp))
|
||||
OSD_Printf("restartvid: Reset failed...\n");
|
||||
}
|
||||
|
||||
return sdl_vsync;
|
||||
return vsync_renderlayer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1551,7 +1551,7 @@ static void sdl_trycreaterenderer_fail(char const * const failurepoint)
|
|||
|
||||
static void sdl_trycreaterenderer(int32_t const x, int32_t const y)
|
||||
{
|
||||
int const flags = SDL_RENDERER_ACCELERATED | (sdl_vsync ? SDL_RENDERER_PRESENTVSYNC : 0);
|
||||
int const flags = SDL_RENDERER_ACCELERATED | (vsync_renderlayer ? SDL_RENDERER_PRESENTVSYNC : 0);
|
||||
|
||||
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, flags);
|
||||
if (!sdl_renderer)
|
||||
|
@ -1658,7 +1658,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
return -1;
|
||||
}
|
||||
|
||||
SDL_GL_SetSwapInterval(sdl_vsync);
|
||||
SDL_GL_SetSwapInterval(vsync_renderlayer);
|
||||
|
||||
setrefreshrate();
|
||||
|
||||
|
|
|
@ -58,16 +58,16 @@ HWND win_gethwnd(void)
|
|||
#ifdef USE_OPENGL
|
||||
int setvsync(int newSync)
|
||||
{
|
||||
if (sdl_vsync == newSync)
|
||||
if (vsync_renderlayer == newSync)
|
||||
return newSync;
|
||||
|
||||
sdl_vsync = newSync;
|
||||
vsync_renderlayer = newSync;
|
||||
|
||||
resetvideomode();
|
||||
if (setgamemode(fullscreen, xdim, ydim, bpp))
|
||||
OSD_Printf("restartvid: Reset failed...\n");
|
||||
|
||||
return sdl_vsync;
|
||||
return vsync_renderlayer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -394,7 +394,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
{ SDL_GL_MULTISAMPLESAMPLES, glmultisample },
|
||||
{ SDL_GL_STENCIL_SIZE, 1 },
|
||||
{ SDL_GL_ACCELERATED_VISUAL, 1 },
|
||||
{ SDL_GL_SWAP_CONTROL, sdl_vsync },
|
||||
{ SDL_GL_SWAP_CONTROL, vsync_renderlayer },
|
||||
};
|
||||
|
||||
do
|
||||
|
@ -404,7 +404,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
/* HACK: changing SDL GL attribs only works before surface creation,
|
||||
so we have to create a new surface in a different format first
|
||||
to force the surface we WANT to be recreated instead of reused. */
|
||||
if (sdl_vsync != ovsync)
|
||||
if (vsync_renderlayer != ovsync)
|
||||
{
|
||||
if (sdl_surface)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
SDL_SetVideoMode(1, 1, 8, SDL_NOFRAME | SURFACE_FLAGS | ((fs & 1) ? SDL_FULLSCREEN : 0));
|
||||
SDL_FreeSurface(sdl_surface);
|
||||
}
|
||||
ovsync = sdl_vsync;
|
||||
ovsync = vsync_renderlayer;
|
||||
}
|
||||
sdl_surface = SDL_SetVideoMode(x, y, c, SDL_OPENGL | ((fs & 1) ? SDL_FULLSCREEN : 0));
|
||||
if (!sdl_surface)
|
||||
|
|
|
@ -131,7 +131,7 @@ int32_t bytesperline=0;
|
|||
int32_t lockcount=0;
|
||||
int32_t glcolourdepth=32;
|
||||
#ifdef USE_OPENGL
|
||||
static int32_t vsync_render=0;
|
||||
static int32_t vsync_renderlayer;
|
||||
#endif
|
||||
uint32_t maxrefreshfreq=60;
|
||||
intptr_t frameplace=0;
|
||||
|
@ -1698,7 +1698,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
}
|
||||
|
||||
#if defined USE_OPENGL && defined USE_GLEXT
|
||||
if (hGLWindow && glinfo.vsync) bwglSwapIntervalEXT(vsync_render);
|
||||
if (hGLWindow && glinfo.vsync) bwglSwapIntervalEXT(vsync_renderlayer);
|
||||
#endif
|
||||
if (inp) AcquireInputDevices(1);
|
||||
modechange=1;
|
||||
|
@ -1730,10 +1730,10 @@ int setvsync(int newSync)
|
|||
{
|
||||
if (!glinfo.vsync)
|
||||
{
|
||||
vsync_render = 0;
|
||||
vsync_renderlayer = 0;
|
||||
return 0;
|
||||
}
|
||||
vsync_render = newSync;
|
||||
vsync_renderlayer = newSync;
|
||||
# ifdef USE_GLEXT
|
||||
bwglSwapIntervalEXT(newSync);
|
||||
# endif
|
||||
|
|
Loading…
Reference in a new issue