diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index caccbab70..ead13e21e 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -92,9 +92,6 @@ char nogl=0; #endif static int32_t vsync_renderlayer; int32_t maxrefreshfreq=0; -#if SDL_MAJOR_VERSION==2 -static uint32_t currentVBlankInterval=0; -#endif // last gamma, contrast, brightness static float lastvidgcb[3]; @@ -1654,8 +1651,6 @@ void setrefreshrate(void) if (!newmode.refresh_rate) newmode.refresh_rate = 60; - - currentVBlankInterval = 1000/newmode.refresh_rate; } int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs) @@ -1931,13 +1926,7 @@ void videoShowFrame(int32_t w) OSD_Printf("glfinish time: %2.3f\n", clock.TimeMS()); #endif SDL_GL_SwapWindow(sdl_window); - /* - if (vsync) - { - // busy loop until we're ready to update again - while (SDL_GetTicks()-lastSwapTime < currentVBlankInterval) {} - } - */ + lastSwapTime = SDL_GetTicks(); return; }