Fix showing the minimap using the joystick.
authorGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 22:09:08 +0000 (23:09 +0100)
committerGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 22:09:08 +0000 (23:09 +0100)
src/game.cpp
src/map.cpp

index 29aafdfbae6255ccee848fe24dc315f71d7d03e7..d8f95032c896388e4dc19ab8a1ae309c5db86394 100644 (file)
@@ -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));
index 34dbcfad793995d87d8c50e7060e2257e5a0561b..45559d3959ac9d70491aafddd9bc55246a436d28 100644 (file)
@@ -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;
                }