From 8859bc91e2b58acc885696f9603a12bda21a74ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 10 Jun 2017 14:48:18 +0200 Subject: [PATCH] IOSC: Add storage for key misc data Will be used to store the exponent for RSA keys. --- Source/Core/Core/IOS/IOSC.cpp | 9 ++++++++- Source/Core/Core/IOS/IOSC.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/IOS/IOSC.cpp b/Source/Core/Core/IOS/IOSC.cpp index 278d33cba9..9c9b6277fc 100644 --- a/Source/Core/Core/IOS/IOSC.cpp +++ b/Source/Core/Core/IOS/IOSC.cpp @@ -251,9 +251,16 @@ void IOSC::LoadDefaultEntries(ConsoleType console_type) IOSC::KeyEntry::KeyEntry() = default; +IOSC::KeyEntry::KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector&& data_, + std::array&& 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&& data_, 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_) { } diff --git a/Source/Core/Core/IOS/IOSC.h b/Source/Core/Core/IOS/IOSC.h index e3f2595a12..dff17aa017 100644 --- a/Source/Core/Core/IOS/IOSC.h +++ b/Source/Core/Core/IOS/IOSC.h @@ -191,12 +191,15 @@ private: { KeyEntry(); KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector&& data_, u32 owner_mask_); + KeyEntry(ObjectType type_, ObjectSubType subtype_, std::vector&& data_, + std::array&& misc_data_, u32 owner_mask_); void DoState(PointerWrap& p); bool in_use = false; ObjectType type; ObjectSubType subtype; std::vector data; + std::array misc_data{}; u32 owner_mask = 0; }; // The Wii's IOSC is limited to 32 entries, including 12 built-in entries.