From d9c7509a8ed5f190743abeb4ce6702f0549abde3 Mon Sep 17 00:00:00 2001 From: neonloop Date: Thu, 11 Mar 2021 23:51:42 +0000 Subject: Makes button names symbolic for easier overriding This puts platform-specific overrides in a central location and makes button references easier to understand. --- shell/menu/buttons.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shell/menu/buttons.h (limited to 'shell/menu/buttons.h') diff --git a/shell/menu/buttons.h b/shell/menu/buttons.h new file mode 100644 index 0000000..6be3f18 --- /dev/null +++ b/shell/menu/buttons.h @@ -0,0 +1,31 @@ +#ifndef BUTTONS_H +#define BUTTONS_H + +#ifdef TRIMUI +#include "buttons_trimui.h" +#else + +#include + +#define BTN_UP SDLK_UP +#define BTN_RIGHT SDLK_RIGHT +#define BTN_DOWN SDLK_DOWN +#define BTN_LEFT SDLK_LEFT +#define BTN_A SDLK_LCTRL +#define BTN_B SDLK_LALT +#define BTN_X SDLK_LSHIFT +#define BTN_Y SDLK_SPACE +#define BTN_L SDLK_TAB +#define BTN_R SDLK_BACKSPACE +#define BTN_START SDLK_RETURN +#define BTN_SELECT SDLK_ESCAPE +#define BTN_MENU SDLK_RCTRL + +#define BTN_L2 SDLK_END +#define BTN_R2 SDLK_3 +#define BTN_VOLUMEUP SDLK_AMPERSAND +#define BTN_VOLUMEDOWN SDLK_WORLD_73 +#define BTN_HOME SDLK_HOME +#endif + +#endif // BUTTONS_H -- cgit v1.2.3