From 8ae2b8f9b4d8211286fe0279a22feffe5c060d18 Mon Sep 17 00:00:00 2001 From: Mark Calderbank Date: Sun, 11 Feb 2007 20:18:41 +0000 Subject: [PATCH] Step back a bit when going from ffwd to play --- player.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/player.cc b/player.cc index ef2c0f9..b47ef45 100644 --- a/player.cc +++ b/player.cc @@ -20,6 +20,8 @@ #include "player.h" +#define USER_RESPONSE_TIME 500 // Milliseconds + // ----------------------------------- Called from outside, one offs or info funcs Player::Player(MessageQueue* tmessageQueue, void* tmessageReceiver, bool tIsRecording) @@ -546,6 +548,11 @@ void Player::switchState(UCHAR toState, ULONG jumpFrame) case S_PLAY: // to S_PLAY { state = S_PLAY; + ULONG stepback = USER_RESPONSE_TIME * video->getFPS() * ifactor / 1000; + if (stepback < currentFrameNumber) + currentFrameNumber -= stepback; + else + currentFrameNumber = 0; restartAtFrame(currentFrameNumber); return; } -- 2.39.5