fix(input): save Steam touch layout without existing config (#2580)

* fix(input): save Steam touch layout without existing config

* fix(input): preserve unreadable Steam touch config on save

* test(input): register configset in unreadable touch config fixture
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-13 17:24:25 -05:00
1 parent 0b8a3f1ee8
commit bc929c08b2
2 files changed
+32 -1

No files matched your search

@@ -390,7 +390,8 @@ object SteamTouchConfig {
options: Options? = null,
): File? {
val dir = configDir(context) ?: return null
val source = bindings.entries.fold(config.text ?: return null) { text, (ref, change) ->
val base = config.text ?: if (config.file == null && bindings.isEmpty()) "\"controller_mappings\"\n{\n\t\"controller_type\"\t\t\"controller_mobile_touch\"\n}\n" else return null
val source = bindings.entries.fold(base) { text, (ref, change) ->
SteamTouchBindings.rewrite(text, ref, change) ?: text
}
val key = steamKey(context, appId)