summaryrefslogtreecommitdiffstats
path: root/src/core/ControllerConfig.cpp
diff options
context:
space:
mode:
authorAdrian Graber <adrian@adriangraber.com>2021-07-06 18:05:21 +0200
committerAdrian Graber <adrian@adriangraber.com>2021-07-13 00:50:49 +0200
commita99a04ed49fe5cea1eb8292d9ffeefb40d10ac82 (patch)
tree250193cb6499602010e8501b8d0f563f29e455a7 /src/core/ControllerConfig.cpp
parentFix WINDOWS -> WIN32 on cmake (diff)
downloadre3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.gz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.bz2
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.lz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.xz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.zst
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.zip
Diffstat (limited to 'src/core/ControllerConfig.cpp')
-rw-r--r--src/core/ControllerConfig.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index e72af7e4..8775792f 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -2644,6 +2644,14 @@ const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
#undef PS2_CROSS
#undef PS2_SQUARE
+const char *NintendoSwitchButtons_noIcons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("Y", "A", "B", "X", "L", "ZL", "LS", "R", "ZR", "RS", "BACK");
+
+#ifdef BUTTON_ICONS
+const char *NintendoSwitchButtons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK");
+#endif
+
#undef CONTROLLER_BUTTONS
#undef VFB
@@ -2664,6 +2672,9 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
case CMenuManager::CONTROLLER_DUALSHOCK4:
Buttons = CFont::ButtonsSlot != -1 ? PlayStationButtons : PlayStationButtons_noIcons;
break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = CFont::ButtonsSlot != -1 ? NintendoSwitchButtons : NintendoSwitchButtons_noIcons;
+ break;
default:
#endif
Buttons = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
@@ -2679,6 +2690,9 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
case CMenuManager::CONTROLLER_DUALSHOCK4:
Buttons = PlayStationButtons_noIcons;
break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = NintendoSwitchButtons_noIcons;
+ break;
default:
Buttons = XboxButtons_noIcons;
break;