From 1ee4e232fafbd3950b9fbf20b93ec392b162cbde Mon Sep 17 00:00:00 2001 From: Fay Date: Mon, 18 Sep 2017 07:27:03 +0200 Subject: [PATCH] Removed unnecessary full screen redraws in swipe mode; (#381) --- client/CPlayerInterface.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 438cf54c8..d65e122df 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -1707,12 +1707,10 @@ void CPlayerInterface::update() GH.updateTime(); GH.handleEvents(); -#ifdef VCMI_ANDROID - if (adventureInt && !adventureInt->isActive() && (adventureInt->swipeTargetPosition.x >= 0 || adventureInt->swipeTargetPosition.y >= 0)) -#else // !VCMI_ANDROID - if (adventureInt && !adventureInt->isActive() && adventureInt->scrollingDir) //player forces map scrolling though interface is disabled -#endif // !VCMI_ANDROID - GH.totalRedraw(); + if (!adventureInt || adventureInt->isActive()) + GH.simpleRedraw(); + else if((adventureInt->swipeEnabled && adventureInt->swipeMovementRequested) || adventureInt->scrollingDir) + GH.totalRedraw(); //player forces map scrolling though interface is disabled else GH.simpleRedraw(); }