Back up part of SYSCONF when switching to emulated BT

This fixes an issue where the Bluetooth info section could be fully
filled up by syncing 5 Wiimotes in passthrough mode then switching to
emulated Bluetooth; emulated Wiimotes were then unable to be used.

The "real" SYSCONF section is now backed up before being replaced with
a blank section that the emulated BT adapter can always fill with 5
Wiimotes without issues.

This backup is restored by the passthrough code, instead of during
the Bluetooth mode switch because this should be done regardless of the
user interface, and even without UI (if the config file is edited
manually).
This commit is contained in:
Léo Lam
2016-10-02 16:59:41 +02:00
parent b91095a9fc
commit 8912bb3ff4
5 changed files with 59 additions and 19 deletions

View File

@ -120,6 +120,7 @@
#define WII_STATE "state.dat"
#define WII_SDCARD "sd.raw"
#define WII_BTDINF_BACKUP "btdinf.bak"
#define WII_SETTING "setting.txt"