In the menus SDLK_KP_ENTER key should behave the same as SDLK_RETURN

This commit is contained in:
drian
2021-02-15 05:57:10 +01:00
parent b8b0eb96bd
commit 6cce372436
+1 -1
View File
@@ -1205,7 +1205,7 @@ bool menukey(int code, bool isdown, SDL_Keymod mod)
}
if(!curmenu->allowinput || !curmenu->items.inrange(menusel)) return false;
mitem &m = *curmenu->items[menusel];
if(code==SDLK_RETURN || code==SDLK_SPACE || code==SDL_AC_BUTTON_LEFT || code==SDL_AC_BUTTON_MIDDLE)
if(code==SDLK_RETURN || code==SDLK_KP_ENTER || code==SDLK_SPACE || code==SDL_AC_BUTTON_LEFT || code==SDL_AC_BUTTON_MIDDLE)
{
if(!m.greyedout && m.select() != -1) audiomgr.playsound(S_MENUENTER, SP_HIGHEST);
return true;