diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-27 12:08:07 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-27 12:08:07 -0500 |
commit | 3c793733b6350451fb3000a8a5e41aa5cfe98bfb (patch) | |
tree | 9561f2e888d024a53cc7f28c0e97040d4024e174 | |
parent | 1656242563d14fa564bab8d4bc40054ab8998553 (diff) | |
download | tanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.tar.gz tanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.tar.bz2 tanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.zip |
Pressing M mutes/unmutes music
(except when the debug console is open)
-rw-r--r-- | src/input_system.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 73a28bd..49b27ec 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp | |||
@@ -54,6 +54,12 @@ void InputSystem::tick(double dt) { | |||
54 | char* clipboardText = SDL_GetClipboardText(); | 54 | char* clipboardText = SDL_GetClipboardText(); |
55 | debugText_.append(clipboardText); | 55 | debugText_.append(clipboardText); |
56 | SDL_free(clipboardText); | 56 | SDL_free(clipboardText); |
57 | } else if (!debugConsole_ && e.key.keysym.sym == SDLK_m) { | ||
58 | if (game_.getMixer().isMusicMuted()) { | ||
59 | game_.getMixer().unmuteMusic(); | ||
60 | } else { | ||
61 | game_.getMixer().muteMusic(); | ||
62 | } | ||
57 | } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { | 63 | } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { |
58 | if (game_.isGameplayPaused()) continue; | 64 | if (game_.isGameplayPaused()) continue; |
59 | 65 | ||