From f850e64037cc6ba703a8a58b59e86378743b164e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 19 Jun 2017 13:22:34 +0200 Subject: [PATCH] add volume down and volume up keys --- input/input_keymaps.c | 5 +++++ libretro-common/include/libretro.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/input/input_keymaps.c b/input/input_keymaps.c index ddd900a45f..313a98a9a8 100644 --- a/input/input_keymaps.c +++ b/input/input_keymaps.c @@ -189,6 +189,8 @@ const struct input_key_map input_config_key_map[] = { { "subtract", RETROK_KP_MINUS }, { "kp_plus", RETROK_KP_PLUS }, { "kp_minus", RETROK_KP_MINUS }, + { "volume-", RETROK_VOLUMEDOWN }, + { "volume+", RETROK_VOLUMEUP }, { "f1", RETROK_F1 }, { "f2", RETROK_F2 }, { "f3", RETROK_F3 }, @@ -1087,6 +1089,9 @@ const struct rarch_key_map rarch_key_map_linux[] = { { KEY_EURO, RETROK_EURO }, #endif { KEY_UNDO, RETROK_UNDO }, + { KEY_VOLUMEDOWN, RETROK_VOLUMEDOWN }, + { KEY_VOLUMEUP, RETROK_VOLUMEUP }, + { 0, RETROK_UNKNOWN }, }; #endif diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index b100865c5a..d486ef2265 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -422,6 +422,9 @@ enum retro_key RETROK_EURO = 321, RETROK_UNDO = 322, + RETROK_VOLUMEDOWN = 323, + RETROK_VOLUMEUP = 324, + RETROK_LAST, RETROK_DUMMY = INT_MAX /* Ensure sizeof(enum) == sizeof(int) */