]> source.dussan.org Git - tigervnc.git/commitdiff
Update the time position 4 times in 1 second (every 250 ms).
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 24 Jan 2005 11:33:06 +0000 (11:33 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 24 Jan 2005 11:33:06 +0000 (11:33 +0000)
It reduces the time twinkling.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@119 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/rfbplayer.cxx

index 94513d15b46a41a8fd1b6fea4834a47e115413fa..4fd2d278a784b06e169e657f31b70292581d8943 100644 (file)
@@ -398,6 +398,7 @@ LRESULT RfbPlayer::processFrameMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARA
 
 void RfbPlayer::run() {
   long initTime = -1;
+  long update_time = GetTickCount();
 
   // Process the rfb messages
   while (fRun) {
@@ -406,8 +407,10 @@ void RfbPlayer::run() {
         setPos(initTime);
         initTime = -1;
       }
-      if (!isSeeking())
+      if ((!isSeeking()) && ((GetTickCount() - update_time) >= 250)) {
         updatePos();
+        update_time = GetTickCount();
+      }
       processMsg();
     } catch (rdr::Exception e) {
       if (strcmp(e.str(), "[End Of File]") == 0) {