VolumeWii: Defer loading tickets, TMDs and keys until when needed

This should make building the game list cache a tiny bit
faster, since we won't have to read anything from
partitions other than the game partition.
This commit is contained in:
JosJuice
2017-06-24 18:42:36 +02:00
parent 2c7e93f3b8
commit 78217532e5
2 changed files with 55 additions and 46 deletions

View File

@ -12,6 +12,7 @@
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/Lazy.h"
#include "Core/IOS/ES/Formats.h"
#include "DiscIO/Volume.h"
@ -66,9 +67,9 @@ public:
private:
struct PartitionDetails
{
std::unique_ptr<mbedtls_aes_context> key;
IOS::ES::TicketReader ticket;
IOS::ES::TMDReader tmd;
Common::Lazy<std::unique_ptr<mbedtls_aes_context>> key;
Common::Lazy<IOS::ES::TicketReader> ticket;
Common::Lazy<IOS::ES::TMDReader> tmd;
u32 type;
};