summaryrefslogtreecommitdiff
path: root/src/doom/m_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/m_menu.c')
-rw-r--r--src/doom/m_menu.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index d1d0aa05..bae11cc8 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1428,6 +1428,22 @@ boolean M_Responder (event_t* ev)
static int mousex = 0;
static int lastx = 0;
+ // In testcontrols mode, none of the function keys should do anything
+ // - the only key is escape to quit.
+
+ if (testcontrols)
+ {
+ if (ev->type == ev_quit
+ || (ev->type == ev_keydown
+ && (ev->data1 == key_menu_activate || ev->data1 == key_menu_quit)))
+ {
+ I_Quit();
+ return true;
+ }
+
+ return false;
+ }
+
// "close" button pressed on window?
if (ev->type == ev_quit)
{
@@ -1533,20 +1549,6 @@ boolean M_Responder (event_t* ev)
if (key == -1)
return false;
- // In testcontrols mode, none of the function keys should do anything
- // - the only key is escape to quit.
-
- if (testcontrols)
- {
- if (key == key_menu_activate || key == key_menu_quit)
- {
- I_Quit();
- return true;
- }
-
- return false;
- }
-
// Save Game string input
if (saveStringEnter)
{