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
This commit is contained in:
SomeTroglodyte 2021-05-17 21:14:49 +02:00 committed by GitHub
parent fc7859e4e7
commit 7b822643d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {