void Player::skipBackwardInt(int seconds)
{
logger->log("Player", Log::DEBUG, "SKIP BACKWARD %i SECONDS", seconds);
- long newFrameNum = getCurrentFrameNum() + (seconds * video->getFPS());
+ long newFrameNum = getCurrentFrameNum() - (seconds * video->getFPS());
if (newFrameNum < 0) newFrameNum = 0;
- restartAt(newFrameNum);
+ restartAtFrame(newFrameNum);
}
void Player::jumpToPercentInt(int percent)
double pos01;
int posPix;
- pos01 = ((double)startMargin * video->getFPS()) / lengthFrames;
+ pos01 = (startMargin * video->getFPS()) / (double)lengthFrames;
posPix = (int)(302 * pos01);
rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);
rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT);
- pos01 = lengthFrames - (endMargin * video->getFPS()) / lengthFrames;
+ pos01 = (lengthFrames - (endMargin * video->getFPS())) / (double)lengthFrames;
posPix = (int)(302 * pos01);
rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);