IOS: Fix savestates for Bluetooth passthrough

This fixes savestates when using Bluetooth passthrough by keeping track
of pending transfer commands and discarding them on state load, so that
the emulated software receives a reply to IOS requests as expected.

With this change, savestates in BT passthrough should work as long as
no Wiimote is connected when creating the savestate and when
restoring it. Yes, I know this is an important limitation -- but
that is probably the best we can do, and it's still better than
completely broken savestates.
This commit is contained in:
Léo Lam
2017-01-12 21:29:09 +01:00
parent 3c184dcf8d
commit 18957bdb0a
3 changed files with 107 additions and 29 deletions

View File

@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
static const u32 STATE_VERSION = 72; // Last changed in PR 4710
static const u32 STATE_VERSION = 73; // Last changed in PR 4651
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,