summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index b5d12d58..666774fe 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -142,8 +142,12 @@ int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif
#ifdef GAMEPAD_MENU
+#ifdef __SWITCH__
+int8 CMenuManager::m_PrefsControllerType = CONTROLLER_NINTENDO_SWITCH;
+#else
int8 CMenuManager::m_PrefsControllerType = CONTROLLER_XBOXONE;
#endif
+#endif
int32 CMenuManager::OS_Language = LANG_ENGLISH;
int8 CMenuManager::m_PrefsUseVibration;
@@ -3674,6 +3678,7 @@ const char* controllerTypesPaths[] = {
"MODELS/FRONTEND_DS4.TXD",
"MODELS/FRONTEND_X360.TXD",
"MODELS/FRONTEND_XONE.TXD",
+ "MODELS/FRONTEND_NSW.TXD",
};
void
@@ -3686,6 +3691,9 @@ CMenuManager::LoadController(int8 type)
case CONTROLLER_DUALSHOCK4:
CFont::LoadButtons("MODELS/PS3BTNS.TXD");
break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ CFont::LoadButtons("MODELS/NSWBTNS.TXD");
+ break;
default:
CFont::LoadButtons("MODELS/X360BTNS.TXD");
break;
@@ -5925,6 +5933,18 @@ CMenuManager::PrintController(void)
TEXT_L2R2_Y += 5.0f;
TEXT_SELECT_X += 3.0f;
break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ TEXT_L1_Y += 5.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 5.0f;
+ TEXT_TRIANGLE_Y += 3.0f;
+ TEXT_CIRCLE_Y += 3.0f;
+ TEXT_CROSS_Y += 3.0f;
+ TEXT_LSTICK_Y -= 23.0f;
+ TEXT_DPAD_Y += 25.0;
+ TEXT_RSTICK_Y += 1.0f;
+ TEXT_R3_Y += 1.0f;
+ break;
};
if (m_DisplayControllerOnFoot) {