IOSC: Add storage for key misc data

Will be used to store the exponent for RSA keys.
This commit is contained in:
Léo Lam 2017-06-10 14:48:18 +02:00
parent d4f501bca6
commit 8859bc91e2
2 changed files with 11 additions and 1 deletions

View File

@ -251,9 +251,16 @@ void IOSC::LoadDefaultEntries(ConsoleType console_type)
IOSC::KeyEntry::KeyEntry() = default; IOSC::KeyEntry::KeyEntry() = default;
IOSC::KeyEntry::KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_,
std::array<u8, 4>&& misc_data_, u32 owner_mask_)
: in_use(true), type(type_), subtype(subtype_), data(std::move(data_)),
misc_data(std::move(misc_data_)), owner_mask(owner_mask_)
{
}
IOSC::KeyEntry::KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_, IOSC::KeyEntry::KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_,
u32 owner_mask_) u32 owner_mask_)
: in_use(true), type(type_), subtype(subtype_), data(std::move(data_)), owner_mask(owner_mask_) : KeyEntry(type_, subtype_, std::move(data_), {}, owner_mask_)
{ {
} }

View File

@ -191,12 +191,15 @@ private:
{ {
KeyEntry(); KeyEntry();
KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_, u32 owner_mask_); KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_, u32 owner_mask_);
KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector<u8>&& data_,
std::array<u8, 4>&& misc_data_, u32 owner_mask_);
void DoState(PointerWrap& p); void DoState(PointerWrap& p);
bool in_use = false; bool in_use = false;
ObjectType type; ObjectType type;
ObjectSubType subtype; ObjectSubType subtype;
std::vector<u8> data; std::vector<u8> data;
std::array<u8, 4> misc_data{};
u32 owner_mask = 0; u32 owner_mask = 0;
}; };
// The Wii's IOSC is limited to 32 entries, including 12 built-in entries. // The Wii's IOSC is limited to 32 entries, including 12 built-in entries.