diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input_system.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 3e4b679..56516ac 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp | |||
@@ -59,11 +59,13 @@ void InputSystem::tick(double dt) { | |||
59 | char* clipboardText = SDL_GetClipboardText(); | 59 | char* clipboardText = SDL_GetClipboardText(); |
60 | debugText_.append(clipboardText); | 60 | debugText_.append(clipboardText); |
61 | SDL_free(clipboardText); | 61 | SDL_free(clipboardText); |
62 | } else if (!debugConsole_ && e.key.keysym.sym == SDLK_m) { | 62 | } else if (e.key.keysym.sym == SDLK_m) { |
63 | if (game_.getMixer().isMusicMuted()) { | 63 | if (!debugConsole_ && !game_.getSystem<MenuSystem>().isMenuOpen()) { |
64 | game_.getMixer().unmuteMusic(); | 64 | if (game_.getMixer().isMusicMuted()) { |
65 | } else { | 65 | game_.getMixer().unmuteMusic(); |
66 | game_.getMixer().muteMusic(); | 66 | } else { |
67 | game_.getMixer().muteMusic(); | ||
68 | } | ||
67 | } | 69 | } |
68 | } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { | 70 | } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { |
69 | if (game_.isGameplayPaused()) continue; | 71 | if (game_.isGameplayPaused()) continue; |