cfg: optimize saving config (#714)

## Link to GitHub Issue or related Pull Request, if one exists
#0

## Description of change
Save config xml once instead of ~33 times

## Testing
xml is still saved properly
This commit is contained in:
drmext
2026-05-29 16:09:02 +00:00
committed by GitHub
parent 89602cfcab
commit b558df3340
3 changed files with 19 additions and 5 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ public:
bool getStatus();
bool createConfigFile();
bool addGame(Game &game);
bool addGame(Game &game, bool save = true);
// flush pending in-memory changes to disk; intended to be paired with
// addGame(game, false) in bulk-init paths so we write the XML once instead
// of once per game
void save();
bool updateBinding(const Game &game, const Button &button, int alternative);
bool updateBinding(const Game &game, const Analog &analog);