From: Ketmar Dark Date: Mon, 12 Feb 2018 12:24:06 +0000 (+0200) Subject: even more vsync! i like to move it, move it! X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=c788a8f517b16efde6f21744bb078fa8be57989f even more vsync! i like to move it, move it! --- diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 56df2d1..eda53a8 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -153,6 +153,7 @@ begin SDL_GL_MakeCurrent(h_Wnd, h_GL); SDL_ShowCursor(SDL_DISABLE); + if (h_GL <> nil) then g_SetVSync(gVSync); if (gFullscreen) then begin nw := 0; @@ -523,7 +524,8 @@ begin fuiScrWdt := gScreenWidth; fuiScrHgt := gScreenHeight; if (assigned(oglInitCB)) then oglInitCB(); - g_SetVSync(gVSync); + SDL_GL_MakeCurrent(h_Wnd, h_GL); + if (h_GL <> nil) then g_SetVSync(gVSync); {$ENDIF} e_ResizeWindow(gScreenWidth, gScreenHeight);