DEADSOFTWARE

fix slope interpolation; add r_maxfps
[d2df-sdl.git] / src / game / g_window.pas
index 351edf913e91396a154c5ae8a5c52a08cf32c5e2..f55c43001f90849c064bfc3a98b9dac28370322f 100644 (file)
@@ -171,7 +171,11 @@ begin
   if flag then
     Time_Old := Time - (Time_Delta mod 28);
 
-  if (Time - Frame > 4) then
+  // don't wait if VSync is on, GL already probably waits enough
+  if gLerpActors then
+    flag := (Time - Frame >= gFrameTime) or gVSync;
+
+  if flag then
   begin
     if (not wMinimized) then
     begin