mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Two reported bugs, unrelated to each other. RESET (takanome9104, confirmed by lugnel): per-game settings such as affinity and GS multithreading survived a full reset. purgeAllSettingsFiles deleted PCSX2-Android.ini and gamesettings/ from currentInitDataRoot — one root. A device with a configured system directory has TWO, and on a device that has been moved between them gamesettings/ exists under both; the surviving copy is re-read on the next launch. Verified on the test device: gamesettings/ present under BOTH the SD root and app-private storage. Every known root is purged now. Deleting a file that is already gone is free, so casting wide costs nothing. This is the same single-root assumption that hid save states from the library's long-press menu earlier today. Worth suspecting wherever this codebase resolves 'the' data directory. The prefs clear also moved from apply() to commit(). restartApp calls Runtime.exit(0) on the next line, and apply() only guarantees the in-memory update — its disk write is asynchronous and an abrupt exit can beat it. A reset that survives the restart is the entire point of the button. FAST FORWARD (SKrazy on an AYN pad, Shmoda12 on a Thor): Fast Forward (Toggle) bound to L2/R2 came on for a frame and then reported OFF. It worked as Hold, it worked on a non-trigger button like R3, and it worked once the pad was switched to digital triggers. Those three facts together say it: some pads report a trigger BOTH as an axis and as a key event, so one pull reaches the hotkey dispatcher twice — once from sendTrigger, once from the key path. For a HOLD that is harmless, since both compute the same state from the same edge. For a TOGGLE the first flips it on and the second immediately flips it back. Digital triggers send only key events, which is why that setting 'fixed' it. The axis path now claims the press and the key path skips its own edge. Scoped to L2/R2 alone so nothing else changes, and cleared on release so the next pull re-arms. sendTrigger already carried a comment about pads that report triggers both ways — the hold path had been made safe against them, the hotkey path had not.