feat: auto switching tooltips

Currently doesnt work with PS4 & PS3 tooltips, only works with Xbox one & Xbox 360 tooltips
This commit is contained in:
2026-09-05 02:18:20 -04:00
parent 6800455166
commit 8e471b7e9c
2 changed files with 25 additions and 25 deletions
+25 -25
View File
@@ -500,10 +500,11 @@ void UIController::tick()
}
#ifdef _WINDOWS64
//GetControllerType();
GetControllerType();
#endif
}
//str1k3r - PS3 & PS4 icons are broken in some spots, therefore they wont be included yet
#ifdef _WINDOWS64
//str1k3r - this is what actually does all the autoswitching
void UIController::GetControllerType()
@@ -515,19 +516,19 @@ void UIController::GetControllerType()
{
m_LastControllerType = ControllerType;
if (strcmp(ControllerType, "PS3") == 0)
{
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
}
else if (strcmp(ControllerType, "PS4") == 0)
{
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
}
else if (strcmp(ControllerType, "XBOXONE") == 0 || strcmp(ControllerType, "UNKNOWN") == 0)
//if (strcmp(ControllerType, "PS3") == 0)
//{
// controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
//}
//else if (strcmp(ControllerType, "PS4") == 0)
//{
// controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
//}
if (strcmp(ControllerType, "XBOXONE") == 0 || strcmp(ControllerType, "UNKNOWN") == 0)
{
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
}
else if (ControllerType == "XBOX360")
else if (strcmp(ControllerType, "XBOX360") == 0)
{
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
}
@@ -536,7 +537,7 @@ void UIController::GetControllerType()
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
}
//ReloadSkin(eLibrary_ControlTooltips, controlTooltipsPath, (m_fScreenHeight >= 1080.0f) ? L"skinControlTooltipsHD.swf" : L"skinControlTooltips.swf");
ReloadSkin(eLibrary_ControlTooltips, controlTooltipsPath, (m_fScreenHeight >= 1080.0f) ? L"skinControlTooltipsHD.swf" : L"skinControlTooltips.swf");
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
{
@@ -557,15 +558,15 @@ wstring UIController::GetTooltipSkinPath()
{
const char* ControllerType = InputManager.GetControllerType(0);
if (strcmp(ControllerType, "PS3") == 0)
{
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
}
else if (strcmp(ControllerType, "PS4") == 0)
{
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
}
else if (strcmp(ControllerType, "XBOXONE") == 0 || strcmp(ControllerType, "UNKNOWN") == 0)
//if (strcmp(ControllerType, "PS3") == 0)
//{
// return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\PS3HDControls.swf" : L"ControlTooltips\\PS3Controls.swf";
//}
//else if (strcmp(ControllerType, "PS4") == 0)
//{
// return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\OrbisHDControls.swf" : L"ControlTooltips\\OrbisControls.swf";
//}
if (strcmp(ControllerType, "XBOXONE") == 0 || strcmp(ControllerType, "UNKNOWN") == 0)
{
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
}
@@ -578,7 +579,6 @@ wstring UIController::GetTooltipSkinPath()
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
}
}
#endif
void UIController::loadSkins()
@@ -595,17 +595,17 @@ void UIController::loadSkins()
#elif defined _WINDOWS64
if(m_fScreenWidth >= 1920.0f)
{
//tooltipsSkinPath = GetTooltipSkinPath();
tooltipsSkinPath = GetTooltipSkinPath();
platformSkinPath = L"skinHDWin.swf";
}
else if (m_fScreenWidth >= 960.0f && m_fScreenWidth < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
{
//tooltipsSkinPath = GetTooltipSkinPath();
tooltipsSkinPath = GetTooltipSkinPath();
platformSkinPath = L"skinWinVita.swf";
}
else
{
//tooltipsSkinPath = GetTooltipSkinPath();
tooltipsSkinPath = GetTooltipSkinPath();
platformSkinPath = L"skinWin.swf";
}
#elif defined _DURANGO