fix(input): keep Steam touch opt-in

This commit is contained in:
Kurt Himebauch committed 2026-12-04 12:38:43 -05:00
1 parent 6b3e476917
commit 59071d78db
3 files changed
+7 -13

No files matched your search

@@ -6151,9 +6151,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
SessionPrefs.OSC_ALWAYS -> true
SessionPrefs.OSC_STEAM_QAM -> true
SessionPrefs.OSC_NEVER -> false
SessionPrefs.OSC_STEAM_TOUCH -> if (SessionState.mode == SessionService.MODE_STEAM)
SessionPrefs.oscChosen(this) || !PadBridge.anyControllerConnected() && !SteamControllerBle.connected
else !PadBridge.anyControllerConnected() && SessionState.mode != SessionService.MODE_DESKTOP
SessionPrefs.OSC_STEAM_TOUCH -> SessionState.mode == SessionService.MODE_STEAM ||
(!PadBridge.anyControllerConnected() && SessionState.mode != SessionService.MODE_DESKTOP)
else -> !PadBridge.anyControllerConnected() && !SteamControllerBle.connected &&
SessionState.mode != SessionService.MODE_DESKTOP
}
@@ -828,9 +828,8 @@ object SessionPrefs {
prefs(context).getString("shape", null)
?: if (context.packageManager.hasSystemFeature("android.hardware.sensor.hinge_angle")) SHAPE_WIDE else SHAPE_AUTO
/** Until the player picks, Steam sessions use Steam's own touch controls and other sessions DroidDeck's. */
fun oscMode(context: Context, steamSession: Boolean = true): String {
val saved = prefs(context).getString("osc", null) ?: return if (steamSession) OSC_STEAM_TOUCH else OSC_AUTO
val saved = prefs(context).getString("osc", OSC_AUTO) ?: OSC_AUTO
return if (!steamSession && saved == OSC_STEAM_QAM) OSC_AUTO else saved
}
@@ -838,8 +837,6 @@ object SessionPrefs {
prefs(context).edit().putString("osc", mode).apply()
}
fun oscChosen(context: Context) = prefs(context).contains("osc")
/** Whether changes made in a game apply to that game alone, or to the profile every game shares. */
fun inputForAllGames(context: Context) = prefs(context).getBoolean("inputForAllGames", false)