From 9c128af2f85fb435e48ef71794cc895a8cd5a4ac Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 21 Nov 2015 23:09:08 +0100 Subject: [PATCH] Fix showing the minimap using the joystick. --- src/game.cpp | 1 + src/map.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/game.cpp b/src/game.cpp index 29aafdf..d8f9503 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -671,6 +671,7 @@ int doGame() if (config.isControl(CONTROL::MAP)) { + config.resetControl(CONTROL::MAP); if (!map.isBossMission) { showMap((int)(player.x / 32), (int)(player.y / 32)); diff --git a/src/map.cpp b/src/map.cpp index 34dbcfa..45559d3 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -413,6 +413,9 @@ void showMap(int centerX, int centerY) if ((config.isControl(CONTROL::MAP)) || (config.isControl(CONTROL::PAUSE)) || (engine.keyState[SDL_SCANCODE_ESCAPE])) { + engine.keyState[SDL_SCANCODE_ESCAPE] = 0; + config.resetControl(CONTROL::MAP); + config.resetControl(CONTROL::PAUSE); break; } -- 2.39.5