summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-27 12:08:07 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-27 12:08:07 -0500
commit3c793733b6350451fb3000a8a5e41aa5cfe98bfb (patch)
tree9561f2e888d024a53cc7f28c0e97040d4024e174 /src
parent1656242563d14fa564bab8d4bc40054ab8998553 (diff)
downloadtanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.tar.gz
tanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.tar.bz2
tanetane-3c793733b6350451fb3000a8a5e41aa5cfe98bfb.zip
Pressing M mutes/unmutes music
(except when the debug console is open)
Diffstat (limited to 'src')
-rw-r--r--src/input_system.cpp6
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