1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Removed getFrameDeltaMilliseconds from gui handler

This commit is contained in:
Ivan Savenko
2023-05-14 22:30:59 +03:00
parent 8a31aeb94b
commit f84c2c3bb5
4 changed files with 5 additions and 14 deletions

View File

@@ -12,6 +12,7 @@
#include "CMT.h"
#include "gui/CGuiHandler.h"
#include "gui/FramerateManager.h"
#include "renderSDL/SDL_Extensions.h"
#include "CPlayerInterface.h"
#include "../lib/filesystem/Filesystem.h"
@@ -370,7 +371,7 @@ void CVideoPlayer::update( int x, int y, SDL_Surface *dst, bool forceRedraw, boo
auto packet_duration = frame->duration;
#endif
double frameEndTime = (frame->pts + packet_duration) * av_q2d(format->streams[stream]->time_base);
frameTime += GH.getFrameDeltaMilliseconds() / 1000.0;
frameTime += GH.framerateManager().getElapsedMilliseconds() / 1000.0;
if (frameTime >= frameEndTime )
{