summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-01-24 11:33:06 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-01-24 11:33:06 +0000
commitcfd81d199a8f7840c3f7401c59076dc08f00841f (patch)
tree9719365c57e47ad17236a21d4ffdd5065acf1c21
parent3c8fbbf7faab8a8d765468fd5d8a19fe8aa38f30 (diff)
downloadtigervnc-cfd81d199a8f7840c3f7401c59076dc08f00841f.tar.gz
tigervnc-cfd81d199a8f7840c3f7401c59076dc08f00841f.zip
Update the time position 4 times in 1 second (every 250 ms).
It reduces the time twinkling. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@119 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--rfbplayer/rfbplayer.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index 94513d15..4fd2d278 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -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) {