aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-03-16 23:16:53 +0000
committerneonloop2021-03-16 23:16:53 +0000
commit17a4dac3f526e9894b64028c9b60b55471cf3155 (patch)
treed423d64ae2bb7930f21b411d49e43610275ccd6f
parent08504fdaab8e085c6ec6667fee65f0fc42ac43ce (diff)
downloadpcsx_rearmed-17a4dac3f526e9894b64028c9b60b55471cf3155.tar.gz
pcsx_rearmed-17a4dac3f526e9894b64028c9b60b55471cf3155.tar.bz2
pcsx_rearmed-17a4dac3f526e9894b64028c9b60b55471cf3155.zip
Fixes key names in the controls menu
-rw-r--r--frontend/plat_trimui.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/plat_trimui.c b/frontend/plat_trimui.c
index 252ea6c..907a03a 100644
--- a/frontend/plat_trimui.c
+++ b/frontend/plat_trimui.c
@@ -98,12 +98,29 @@ const struct menu_keymap in_sdl_joy_map[] =
{ SDLK_WORLD_3, PBTN_MA3 },
};
+static const char * const in_sdl_key_names[SDLK_LAST] = {
+ [SDLK_UP] = "up",
+ [SDLK_DOWN] = "down",
+ [SDLK_LEFT] = "left",
+ [SDLK_RIGHT] = "right",
+ [SDLK_LSHIFT] = "x",
+ [SDLK_LCTRL] = "b",
+ [SDLK_SPACE] = "a",
+ [SDLK_LALT] = "y",
+ [SDLK_RETURN] = "start",
+ [SDLK_RCTRL] = "select",
+ [SDLK_TAB] = "l",
+ [SDLK_BACKSPACE] = "r",
+ [SDLK_ESCAPE] = "menu",
+};
+
static const struct in_pdata in_sdl_platform_data = {
.defbinds = in_sdl_defbinds,
.key_map = in_sdl_key_map,
.kmap_size = sizeof(in_sdl_key_map) / sizeof(in_sdl_key_map[0]),
.joy_map = in_sdl_joy_map,
.jmap_size = sizeof(in_sdl_joy_map) / sizeof(in_sdl_joy_map[0]),
+ .key_names = in_sdl_key_names,
};
static void *fb_flip(void)