DEADSOFTWARE

even more vsync! i like to move it, move it!
[d2df-sdl.git] / 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);