DEADSOFTWARE

even more vsync! i like to move it, move it!
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Mon, 12 Feb 2018 12:24:06 +0000 (14:24 +0200)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Mon, 12 Feb 2018 12:25:01 +0000 (14:25 +0200)
src/game/g_window.pas

index 56df2d169d730e2526a2d373328f85436675c0b1..eda53a85bd8db361f379d4b21e13010a34a97bb9 100644 (file)
@@ -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);