1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fix map animation playback speed

This commit is contained in:
Ivan Savenko
2023-03-22 15:51:25 +02:00
parent ef07935fbc
commit 54e8abb3eb

View File

@ -60,14 +60,14 @@ BasicMapView::BasicMapView(const Point & offset, const Point & dimensions)
void BasicMapView::render(Canvas & target, bool fullUpdate) void BasicMapView::render(Canvas & target, bool fullUpdate)
{ {
Canvas targetClipped(target, pos); Canvas targetClipped(target, pos);
controller->update(GH.mainFPSmng->getElapsedMilliseconds());
tilesCache->update(controller->getContext()); tilesCache->update(controller->getContext());
tilesCache->render(controller->getContext(), targetClipped, fullUpdate); tilesCache->render(controller->getContext(), targetClipped, fullUpdate);
} }
void BasicMapView::show(SDL_Surface * to) void BasicMapView::show(SDL_Surface * to)
{ {
controller->update(GH.mainFPSmng->getElapsedMilliseconds());
Canvas target(to); Canvas target(to);
CSDL_Ext::CClipRectGuard guard(to, pos); CSDL_Ext::CClipRectGuard guard(to, pos);
render(target, false); render(target, false);
@ -75,6 +75,8 @@ void BasicMapView::show(SDL_Surface * to)
void BasicMapView::showAll(SDL_Surface * to) void BasicMapView::showAll(SDL_Surface * to)
{ {
controller->update(0);
Canvas target(to); Canvas target(to);
CSDL_Ext::CClipRectGuard guard(to, pos); CSDL_Ext::CClipRectGuard guard(to, pos);
render(target, true); render(target, true);