瀏覽代碼

Removed unnecessary full screen redraws in swipe mode; (#381)

Fay 8 年之前
父節點
當前提交
1ee4e232fa
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      client/CPlayerInterface.cpp

+ 4 - 6
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();
 }