dfxvideo: fix frameskip issue
authornotaz <notasas@gmail.com>
Wed, 9 Feb 2011 23:16:49 +0000 (01:16 +0200)
committernotaz <notasas@gmail.com>
Thu, 10 Feb 2011 00:08:04 +0000 (02:08 +0200)
if display is never moved/resized, it's never updated in
frameskip mode. Detect this.

plugins/dfxvideo/gpu.c

index 7372ba4..50d45d5 100644 (file)
@@ -218,6 +218,8 @@ static void updateDisplay(void)                               // UPDATE DISPLAY
    bSkipNextFrame = FALSE;
    DoBufferSwap();                                     // -> swap
   }
+
+  bDoVSyncUpdate=FALSE;                                // vsync done
 }
 
 ////////////////////////////////////////////////////////////////////////
@@ -406,11 +408,14 @@ void CALLBACK GPUupdateLace(void)                      // VSYNC
     }
    else
     {
-     if(bDoVSyncUpdate && !UseFrameSkip)               // some primitives drawn?
-      updateDisplay();                                 // -> update display
+     if((bDoVSyncUpdate && !UseFrameSkip)              // some primitives drawn?
+      || bDoVSyncUpdate >= 8)                          // not syned for a while
+       updateDisplay();                                // -> update display
     }
   }
- bDoVSyncUpdate=FALSE;                                 // vsync done
+
+ if(bDoVSyncUpdate)                                    // if display not synced
+  bDoVSyncUpdate++;                                    // count how many times
 }
 
 ////////////////////////////////////////////////////////////////////////