summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 13:35:59 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 15:34:50 -0500
commit255bb9ce381eeb0989a5b8efb3d41c88a0f2c642 (patch)
treefe2e3f1c03e875aeca2b6f7d0c6b4e469474a2fa /src
parent9107e9e6c337fbd9790eeb7e89e473d5da129f36 (diff)
downloadtanetane-255bb9ce381eeb0989a5b8efb3d41c88a0f2c642.tar.gz
tanetane-255bb9ce381eeb0989a5b8efb3d41c88a0f2c642.tar.bz2
tanetane-255bb9ce381eeb0989a5b8efb3d41c88a0f2c642.zip
Disabled mute shortcut while on menu
Mostly because pressing M while the settings menu is open would not cause the music slider to go down automatically.

#7
Diffstat (limited to 'src')
-rw-r--r--src/input_system.cpp12
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;