summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-08-14 17:09:07 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-08-14 17:09:07 +0200
commit4a5f7464c14f214eadfeb177705902777f52d326 (patch)
treeeef8b7dc86e83f8fdb0ba27a5abedd62892c51e3 /src/core/Frontend.cpp
parentginput script (diff)
parentFix artifact path (diff)
downloadre3-4a5f7464c14f214eadfeb177705902777f52d326.tar
re3-4a5f7464c14f214eadfeb177705902777f52d326.tar.gz
re3-4a5f7464c14f214eadfeb177705902777f52d326.tar.bz2
re3-4a5f7464c14f214eadfeb177705902777f52d326.tar.lz
re3-4a5f7464c14f214eadfeb177705902777f52d326.tar.xz
re3-4a5f7464c14f214eadfeb177705902777f52d326.tar.zst
re3-4a5f7464c14f214eadfeb177705902777f52d326.zip
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 6ef75a33..4820427f 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -540,8 +540,12 @@ CMenuManager::CMenuManager()
#endif
#ifdef GAMEPAD_MENU
+#ifdef __SWITCH__
+ m_PrefsControllerType = CONTROLLER_NINTENDO_SWITCH;
+#else
m_PrefsControllerType = CONTROLLER_XBOXONE;
#endif
+#endif
#ifdef MISSION_REPLAY
m_bAttemptingMissionRetry = false;
@@ -571,7 +575,11 @@ CMenuManager::Initialise(void)
m_nCurrOption = 0;
m_nOptionHighlightTransitionBlend = 0;
CentreMousePointer();
+#ifdef GTA_HANDHELD
+ m_bShowMouse = false;
+#else
m_bShowMouse = true;
+#endif
m_fMapSize = MENU_Y(162.0f); // Y because of HOR+
m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
m_fMapCenterY = MENU_Y(225.0f);
@@ -5973,6 +5981,7 @@ const char* controllerTypesPaths[] = {
"MODELS/FRONTEND_DS4.TXD",
"MODELS/FRONTEND_X360.TXD",
"MODELS/FRONTEND_XONE.TXD",
+ "MODELS/FRONTEND_NSW.TXD",
};
void
@@ -6083,6 +6092,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) {
@@ -6379,6 +6400,7 @@ CMenuManager::PrintController(void)
{
case CONTROLLER_XBOXONE:
case CONTROLLER_XBOX360:
+ case CONTROLLER_NINTENDO_SWITCH:
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE * 2 * scale * 0.65f), MENU_Y(SMALLESTTEXT_Y_SCALE * scale * 0.65f));
switch (m_PrefsLanguage)
{
@@ -6459,6 +6481,7 @@ CMenuManager::PrintController(void)
{
case CONTROLLER_XBOXONE:
case CONTROLLER_XBOX360:
+ case CONTROLLER_NINTENDO_SWITCH:
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE * 2 * scale * 0.65f), MENU_Y(SMALLESTTEXT_Y_SCALE * scale * 0.65f));
switch (m_PrefsLanguage)
{
@@ -6542,6 +6565,7 @@ CMenuManager::PrintController(void)
{
case CONTROLLER_XBOXONE:
case CONTROLLER_XBOX360:
+ case CONTROLLER_NINTENDO_SWITCH:
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE * 2 * scale * 0.65f), MENU_Y(SMALLESTTEXT_Y_SCALE * scale * 0.65f));
switch (m_PrefsLanguage)
{
@@ -6626,6 +6650,7 @@ CMenuManager::PrintController(void)
{
case CONTROLLER_XBOXONE:
case CONTROLLER_XBOX360:
+ case CONTROLLER_NINTENDO_SWITCH:
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE * 2 * scale * 0.65f), MENU_Y(SMALLESTTEXT_Y_SCALE * scale * 0.65f));
CFont::PrintStringFromBottom(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_SMT"));
break;
@@ -6668,6 +6693,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;