Skip to content

Commit

Permalink
Handle A/B controller buttons in quit confirmation menu
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Dec 17, 2023
1 parent 4c6f7f9 commit 1da1b3e
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4375,10 +4375,12 @@ void M_Menu_Quit_f (void)

void M_Quit_Key (int key)
{
if (key == K_ESCAPE ||
key == K_MOUSE2 ||
key == K_MOUSE4)
switch (key)
{
case K_ESCAPE:
case K_BBUTTON:
case K_MOUSE4:
case K_MOUSE2:
if (wasInMenus)
{
m_state = m_quit_prevstate;
Expand All @@ -4390,6 +4392,15 @@ void M_Quit_Key (int key)
key_dest = key_game;
m_state = m_none;
}

case K_ABUTTON:
IN_DeactivateForConsole();
key_dest = key_console;
Host_Quit_f ();
break;

default:
break;
}
}

Expand Down

0 comments on commit 1da1b3e

Please sign in to comment.