mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Only toggle keyboardTyping when input key is valid
Fixes unintended toggles to virtual keyboard
This commit is contained in:
parent
0201d90d21
commit
518366d567
1 changed files with 2 additions and 2 deletions
|
|
@ -237,7 +237,7 @@ void M_MenuTypingInput(INT32 key)
|
||||||
if (!menutyping.keyboardtyping) // controller inputs
|
if (!menutyping.keyboardtyping) // controller inputs
|
||||||
{
|
{
|
||||||
// we pressed a keyboard input that's not any of our buttons
|
// we pressed a keyboard input that's not any of our buttons
|
||||||
if (M_IsTypingKey(key) && menucmd[pid].dpad_lr == 0 && menucmd[pid].dpad_ud == 0
|
if (key >= 0 && M_IsTypingKey(key) && menucmd[pid].dpad_lr == 0 && menucmd[pid].dpad_ud == 0
|
||||||
&& !(menucmd[pid].buttons & MBT_A)
|
&& !(menucmd[pid].buttons & MBT_A)
|
||||||
&& !(menucmd[pid].buttons & MBT_B)
|
&& !(menucmd[pid].buttons & MBT_B)
|
||||||
&& !(menucmd[pid].buttons & MBT_C)
|
&& !(menucmd[pid].buttons & MBT_C)
|
||||||
|
|
@ -252,7 +252,7 @@ void M_MenuTypingInput(INT32 key)
|
||||||
else // Keyboard inputs.
|
else // Keyboard inputs.
|
||||||
{
|
{
|
||||||
// On the flipside, if we're pressing any keyboard input, switch to controller inputs.
|
// On the flipside, if we're pressing any keyboard input, switch to controller inputs.
|
||||||
if (!M_IsTypingKey(key) && (
|
if (key >= 0 && !M_IsTypingKey(key) && (
|
||||||
M_MenuButtonPressed(pid, MBT_A)
|
M_MenuButtonPressed(pid, MBT_A)
|
||||||
|| M_MenuButtonPressed(pid, MBT_B)
|
|| M_MenuButtonPressed(pid, MBT_B)
|
||||||
|| M_MenuButtonPressed(pid, MBT_C)
|
|| M_MenuButtonPressed(pid, MBT_C)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue