NextFrame and PrevFrame no longer requests out of range frames

Originally committed to SVN as r78.
This commit is contained in:
Fredrik Mellbin 2006-02-19 14:28:03 +00:00
parent 38f62c6906
commit e080a06834

View file

@ -125,7 +125,10 @@ int VideoSlider::GetXAtValue(int value) {
// Next frame hotkey // Next frame hotkey
void VideoSlider::NextFrame() { void VideoSlider::NextFrame() {
if (Display->IsPlaying) return; if (Display->IsPlaying) return;
Display->JumpToFrame(GetValue()+1);
//don't request out of range frames
if (GetValue() < max)
Display->JumpToFrame(GetValue()+1);
} }
@ -133,7 +136,10 @@ void VideoSlider::NextFrame() {
// Previous frame hotkey // Previous frame hotkey
void VideoSlider::PrevFrame() { void VideoSlider::PrevFrame() {
if (Display->IsPlaying) return; if (Display->IsPlaying) return;
Display->JumpToFrame(GetValue()-1);
//don't request out of range frames
if (GetValue() > min)
Display->JumpToFrame(GetValue()-1);
} }