IOS/ES: Keep track of the active title properly

This changes ES to keep track of the active title properly,
just like IOS:

* It is NOT changed on resource manager open/close.
* It is reset on IOS reload.
* It is changed by ES_DIVerify and ES_Launch.

IOS stores the active title in a structure like this:

    struct ESTitleContext
    {
      Ticket* ticket;
      TMD* tmd;
      u32 active;
    };

With this commit, we also do keep the Ticket and TMD around. This
makes some of the DI ioctlvs (which return data about the current
active title) trivial to implement in the future.

This fixes the System Menu not being able to see update partitions
and also allows us to change Dolphin's active game info in the future.
This commit is contained in:
Léo Lam 2017-02-26 17:26:08 +01:00
commit 4d776ffa8f
13 changed files with 128 additions and 75 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 = 78; // Last changed in PR 49XX
static const u32 STATE_VERSION = 79; // Last changed in PR 4981
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,