From 535cc2eb4fdbef770fd96e738ecc3024468e7444 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Thu, 12 Aug 2021 21:24:34 +0200 Subject: [PATCH] Improve key bindings for menus --- cgdoom/d_englsh.h | 2 +- cgdoom/i_system.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cgdoom/d_englsh.h b/cgdoom/d_englsh.h index 3a941ce..e928284 100644 --- a/cgdoom/d_englsh.h +++ b/cgdoom/d_englsh.h @@ -63,7 +63,7 @@ #define NETEND "you can't end a netgame!\n\n"PRESSKEY #define ENDGAME "are you sure you want to end the game?\n\n"PRESSYN -#define DOSY "(press y to quit)" +#define DOSY "(press exe to quit)" #define DETAILHI "High detail" #define DETAILLO "Low detail" diff --git a/cgdoom/i_system.c b/cgdoom/i_system.c index 9be5ebe..d6ea2b8 100644 --- a/cgdoom/i_system.c +++ b/cgdoom/i_system.c @@ -308,7 +308,7 @@ int KeycodeToDoomKey(int code) case KEYCODE_RIGHT: return KEY_RIGHTARROW; case KEYCODE_UP: return KEY_UPARROW; case KEYCODE_DOWN: return KEY_DOWNARROW; - case KEYCODE_EXE: return ' '; + case KEYCODE_SQUARE: return ' '; case KEYCODE_ALPHA: return KEY_RCTRL; case KEYCODE_F1: return '1'; case KEYCODE_F2: return '2'; @@ -321,8 +321,8 @@ int KeycodeToDoomKey(int code) case KEYCODE_OPTN: return KEY_PAUSE; case KEYCODE_0: return KEY_SLEFTARROW; case KEYCODE_DOT: return KEY_SRIGHTARROW; - case KEYCODE_XOT: return KEY_ESCAPE; - case KEYCODE_LOG: return KEY_ENTER; + case KEYCODE_MENU: return KEY_ESCAPE; + case KEYCODE_EXE: return KEY_ENTER; default: return -1; } } @@ -359,8 +359,6 @@ void I_StartTic (void) ScanKeyboard(next_st); /* Capture events for special keys */ - if (KeycodePressed(st, next_st, KEYCODE_MENU)) - I_Quit(); if (KeycodePressed(st, next_st, KEYCODE_POWER)) CGCheat(); if (KeycodePressed(st, next_st, KEYCODE_MINUS))