fix star wars controls

This commit is contained in:
izzy2lost
2026-03-03 23:21:45 -05:00
parent 810918c5ff
commit b435c80a88
2 changed files with 15 additions and 2 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ android {
minSdk = 26
targetSdk = 36
versionCode = 21
versionName = "1.2.0"
versionCode = 22
versionName = "1.2.1"
ndk {
abiFilters += listOf("arm64-v8a")
+13
View File
@@ -204,6 +204,13 @@ static bool IsVonGame(const std::string& name)
return lower == "von2" || lower == "von254g" || lower == "von2a" || lower == "von2o";
}
static bool IsStarWarsTrilogyGame(const std::string& name)
{
auto lower = name;
std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return (char)std::tolower(c); });
return lower == "swtrilgy" || lower == "swtrilgya" || lower == "swtrilgyp";
}
static void GunToViewCoords(float& x, float& y)
{
x = (x - 150.0f) / (651.0f - 150.0f);
@@ -383,6 +390,12 @@ struct Super3Host {
// Force simple shader path for Virtual On 2 variants to avoid GPU hangs.
config.Set("AndroidSimpleShader", true);
}
if (IsStarWarsTrilogyGame(gameName)) {
// Star Wars Trilogy touch/mousepad aim should match finger direction.
config.Set("InputAnalogJoyX", "JOY_XAXIS,MOUSE_XAXIS");
config.Set("InputAnalogJoyY", "JOY_YAXIS,MOUSE_YAXIS");
}
}
void ApplyAndroidHardOverrides()