mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-03 06:51:11 +00:00
Remove keypad handling in M_HandleConnectIP
There is no need to have that code anymore, since keypad presses also generate ev_text events. Additionally, made text fields in menus ignore ev_keydown events if they are keypad keys.
This commit is contained in:
parent
c4dbf42ded
commit
50db80f001
1 changed files with 1 additions and 10 deletions
11
src/m_menu.c
11
src/m_menu.c
|
@ -3401,7 +3401,7 @@ boolean M_Responder(event_t *ev)
|
|||
{
|
||||
// ignore ev_keydown events if the key maps to a character, since
|
||||
// the ev_text event will follow immediately after in that case.
|
||||
if (ev->type == ev_keydown && ch >= 32 && ch <= 127)
|
||||
if (ev->type == ev_keydown && ((ch >= 32 && ch <= 127) || (ch >= KEY_KEYPAD7 && ch <= KEY_KPADDEL)))
|
||||
return true;
|
||||
|
||||
routine(ch);
|
||||
|
@ -12195,15 +12195,6 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
setupm_ip[l] = (char)choice;
|
||||
setupm_ip[l+1] = 0;
|
||||
}
|
||||
else if (choice >= 199 && choice <= 211 && choice != 202 && choice != 206) //numpad too!
|
||||
{
|
||||
char keypad_translation[] = {'7','8','9','-','4','5','6','+','1','2','3','0','.'};
|
||||
choice = keypad_translation[choice - 199];
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[l] = (char)choice;
|
||||
setupm_ip[l+1] = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue