dont use it for control setup

This commit is contained in:
Alug committed 2024-03-04 18:13:18 +01:00
1 parent c9a88617b1
commit aa85fc3787
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -3858,6 +3858,7 @@ boolean M_Responder(event_t *ev)
case KEY_BACKSPACE:
if ((currentMenu->menuitems[itemOn].status) == IT_CONTROL)
{
menu_text_input = false; //never use native layout for control setup
// detach any keys associated with the game control
G_ClearControlKeys(setupcontrols, currentMenu->menuitems[itemOn].alphaKey);
S_StartSound(NULL, sfx_shldls);
+1 -1
View File
@@ -865,7 +865,7 @@ static void Impl_HandleKeyboardEvent(SDL_KeyboardEvent evt, Uint32 type)
return;
}
if (cv_nativekeyboard.value && (chat_on || CON_Ready() || menu_text_input)) //only use this this if on chat or console
if (cv_nativekeyboard.value && (chat_on || CON_Ready() || (menu_text_input && menuactive))) //only use this this if on chat or console or the current menu wants inputs from us (except if its the control setup menu ig)
event.data1 = GetTypedChar(evt.keysym.scancode, &evt.keysym);
else
event.data1 = Impl_SDL_Scancode_To_Keycode(evt.keysym.scancode);