diff options
Diffstat (limited to 'src/core/hle/service/am/applets/applets.cpp')
-rw-r--r-- | src/core/hle/service/am/applets/applets.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index 03b9d83e7..be950d320 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp @@ -2,7 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <cstring> +#include "common/assert.h" #include "core/frontend/applets/software_keyboard.h" +#include "core/hle/service/am/am.h" #include "core/hle/service/am/applets/applets.h" namespace Service::AM::Applets { @@ -11,8 +14,15 @@ Applet::Applet() = default; Applet::~Applet() = default; -void Applet::Initialize(std::vector<std::shared_ptr<IStorage>> storage) { +void Applet::Initialize(std::queue<std::shared_ptr<IStorage>> storage) { storage_stack = std::move(storage); + + const auto common_data = storage_stack.front()->GetData(); + storage_stack.pop(); + + ASSERT(common_data.size() >= sizeof(CommonArguments)); + std::memcpy(&common_args, common_data.data(), sizeof(CommonArguments)); + initialized = true; } |