mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
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:
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)
|
||||
|
||||
Reference in new issue
Block a user