allow KP_ENTER to function as K_ENTER in menus, console, etc., after r1042.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1058 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2014-09-22 06:21:06 +00:00
parent b0b3b6fab6
commit 81f3aef1f1
3 changed files with 16 additions and 1 deletions

View file

@ -1762,6 +1762,7 @@ static void VID_MenuKey (int key)
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
switch (video_options_cursor)
{

View file

@ -240,6 +240,7 @@ void Key_Console (int key)
switch (key)
{
case K_ENTER:
case K_KP_ENTER:
key_tabpartial[0] = 0;
Cbuf_AddText (workline + 1); // skip the prompt
Cbuf_AddText ("\n");
@ -500,7 +501,7 @@ void Key_EndChat (void)
void Key_Message (int key)
{
if (key == K_ENTER)
if (key == K_ENTER || key == K_KP_ENTER)
{
if (chat_team)
Cbuf_AddText ("say_team \"");
@ -856,6 +857,7 @@ void Key_Init (void)
consolekeys[K_PGUP] = true;
consolekeys[K_PGDN] = true;
consolekeys[K_SHIFT] = true;
consolekeys[K_KP_ENTER] = true;
consolekeys[K_MWHEELUP] = true;
consolekeys[K_MWHEELDOWN] = true;
consolekeys['`'] = false;

View file

@ -298,6 +298,7 @@ void M_Main_Key (int key)
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
switch (m_main_cursor)
@ -378,6 +379,7 @@ void M_SinglePlayer_Key (int key)
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
switch (m_singleplayer_cursor)
@ -515,6 +517,7 @@ void M_Load_Key (int k)
break;
case K_ENTER:
case K_KP_ENTER:
S_LocalSound ("misc/menu2.wav");
if (!loadable[load_cursor])
return;
@ -558,6 +561,7 @@ void M_Save_Key (int k)
break;
case K_ENTER:
case K_KP_ENTER:
m_state = m_none;
IN_Activate();
key_dest = key_game;
@ -639,6 +643,7 @@ void M_MultiPlayer_Key (int key)
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
switch (m_multiplayer_cursor)
{
@ -767,6 +772,7 @@ forward:
break;
case K_ENTER:
case K_KP_ENTER:
if (setup_cursor == 0 || setup_cursor == 1)
return;
@ -932,6 +938,7 @@ again:
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
M_Menu_LanConfig_f ();
break;
@ -1202,6 +1209,7 @@ void M_Options_Key (int k)
break;
case K_ENTER:
case K_KP_ENTER:
m_entersound = true;
switch (options_cursor)
{
@ -1436,6 +1444,7 @@ void M_Keys_Key (int k)
keys_cursor = 0;
break;
case K_KP_ENTER:
case K_ENTER: // go into bind mode
M_FindKeysForCommand (bindnames[keys_cursor][0], keys);
S_LocalSound ("misc/menu2.wav");
@ -1724,6 +1733,7 @@ void M_LanConfig_Key (int key)
break;
case K_ENTER:
case K_KP_ENTER:
if (lanConfig_cursor == 0)
break;
@ -2244,6 +2254,7 @@ void M_GameOptions_Key (int key)
break;
case K_ENTER:
case K_KP_ENTER:
S_LocalSound ("misc/menu2.wav");
if (gameoptions_cursor == 0)
{
@ -2399,6 +2410,7 @@ void M_ServerList_Key (int k)
break;
case K_ENTER:
case K_KP_ENTER:
S_LocalSound ("misc/menu2.wav");
m_return_state = m_state;
m_return_onerror = true;