diff options
author | StapleButter <thetotalworm@gmail.com> | 2018-12-14 05:48:50 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2018-12-14 05:48:50 +0100 |
commit | c0c115a0eee83a2a5d61d26b8f20525f83f92850 (patch) | |
tree | 649a742cfc6dc5646cfddfd7530ced98eb44ad86 /src | |
parent | c7433ca664252bdb3bb7651cc801770e60ef33a3 (diff) |
fix some wav/mic bugs
Diffstat (limited to 'src')
-rw-r--r-- | src/libui_sdl/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 0a38448..d1e1f70 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -316,7 +316,8 @@ bool JoyButtonPressed(int btnid, int njoybuttons, Uint8* joybuttons, Uint32 hat) void FeedMicInput() { int type = Config::MicInputType; - if (type != 1 && MicCommand == 0) + if ((type != 1 && MicCommand == 0) || + (type == 3 && MicWavBuffer == NULL)) { type = 0; MicBufferReadPos = 0; @@ -692,6 +693,9 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt) for (int i = 0; i < 12; i++) if (evt->Scancode == Config::KeyMapping[i]) KeyInputMask |= (1<<i); + + if (evt->Scancode == Config::HKKeyMapping[HK_Mic]) + MicCommand &= ~1; } else if (!evt->Repeat) { @@ -722,8 +726,6 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt) } if (evt->Scancode == Config::HKKeyMapping[HK_Mic]) MicCommand |= 1; - else - MicCommand &= ~1; if (evt->Scancode == 0x57) // F11 NDS::debug(0); |