diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 76ff22dd4..a6f5b9dba 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -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(); diff --git a/polymer/eduke32/build/src/sdlayer12.c b/polymer/eduke32/build/src/sdlayer12.c index 6d8ce4a29..296f1b8a5 100644 --- a/polymer/eduke32/build/src/sdlayer12.c +++ b/polymer/eduke32/build/src/sdlayer12.c @@ -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) diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 165cdcb16..8125a0b60 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -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