Explorar o código

Fixed border scrolling when game window is maximized

Ivan Savenko %!s(int64=2) %!d(string=hai) anos
pai
achega
ec0a51bd5c
Modificáronse 2 ficheiros con 4 adicións e 3 borrados
  1. 1 0
      ChangeLog.md
  2. 3 3
      client/adventureMap/AdventureMapInterface.cpp

+ 1 - 0
ChangeLog.md

@@ -10,6 +10,7 @@
 * Background battlefield obstacles will now appear below creatures
 * it is now possible to load save game located inside mod
 * Added option to configure reserved screen area in Launcher on iOS
+* Fixed border scrolling when game window is maximized
 
 ### AI PLAYER:
 * BattleAI: Improved performance of AI spell selection

+ 3 - 3
client/adventureMap/AdventureMapInterface.cpp

@@ -169,10 +169,10 @@ void AdventureMapInterface::tick(uint32_t msPassed)
 void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed)
 {
 	/// Width of window border, in pixels, that triggers map scrolling
-	static constexpr uint32_t borderScrollWidth = 15;
+	static constexpr int32_t borderScrollWidth = 15;
 
-	uint32_t scrollSpeedPixels = settings["adventure"]["scrollSpeedPixels"].Float();
-	uint32_t scrollDistance = scrollSpeedPixels * timePassed / 1000;
+	int32_t scrollSpeedPixels = settings["adventure"]["scrollSpeedPixels"].Float();
+	int32_t scrollDistance = scrollSpeedPixels * timePassed / 1000;
 
 	Point cursorPosition = GH.getCursorPosition();
 	Point scrollDirection;