diff options
Diffstat (limited to 'src/libui_sdl')
-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); |