From 7b822643d9d1f01d5bcda170e3c1fc2f0432b6fe Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Mon, 17 May 2021 21:14:49 +0200 Subject: [PATCH] Fix Ctrl-S going to save game screen will not stop scrolling the map (#3949) * Fix Ctrl-S going to save game screen will not stop scrolling the map * Just trying to force github to retry its build checks --- core/src/com/unciv/ui/worldscreen/WorldScreen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 7d8e67466b..1dce065502 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -257,6 +257,8 @@ class WorldScreen(val gameInfo: GameInfo, val viewingCiv:CivilizationInfo) : Cam override fun keyDown(event: InputEvent?, keycode: Int): Boolean { if (keycode !in ALLOWED_KEYS) return false + // Without the following keyPressDispatcher Ctrl-S would leave WASD map scrolling stuck + if (Gdx.input.isKeyPressed(Input.Keys.CONTROL_LEFT) || Gdx.input.isKeyPressed(Input.Keys.CONTROL_RIGHT)) return false pressedKeys.add(keycode) if (infiniteAction == null) {