diff options
author | Liam <byteslice@airmail.cc> | 2024-01-03 07:16:27 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-30 02:17:33 +0100 |
commit | 8a146469c0639ff402e77da8843072ce1f2bce0c (patch) | |
tree | c5dbc016c8ff1affaa06d9bfe7b580b468fed1ba /src/core/hle/service/am/frontend/applet_cabinet.cpp | |
parent | am: rework IStorage for transfer storage (diff) | |
download | yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar.gz yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar.bz2 yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar.lz yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar.xz yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.tar.zst yuzu-8a146469c0639ff402e77da8843072ce1f2bce0c.zip |
Diffstat (limited to 'src/core/hle/service/am/frontend/applet_cabinet.cpp')
-rw-r--r-- | src/core/hle/service/am/frontend/applet_cabinet.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/core/hle/service/am/frontend/applet_cabinet.cpp b/src/core/hle/service/am/frontend/applet_cabinet.cpp index f1f49e83b..0862c81b6 100644 --- a/src/core/hle/service/am/frontend/applet_cabinet.cpp +++ b/src/core/hle/service/am/frontend/applet_cabinet.cpp @@ -16,10 +16,11 @@ namespace Service::AM::Frontend { -Cabinet::Cabinet(Core::System& system_, LibraryAppletMode applet_mode_, - const Core::Frontend::CabinetApplet& frontend_) - : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, - system{system_}, service_context{system_, "CabinetApplet"} { +Cabinet::Cabinet(Core::System& system_, std::shared_ptr<Applet> applet_, + LibraryAppletMode applet_mode_, const Core::Frontend::CabinetApplet& frontend_) + : FrontendApplet{system_, applet_, applet_mode_}, frontend{frontend_}, service_context{ + system_, + "CabinetApplet"} { availability_change_event = service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent"); @@ -41,7 +42,7 @@ void Cabinet::Initialize() { common_args.play_startup_sound, common_args.size, common_args.system_tick, common_args.theme_color); - const auto storage = broker.PopNormalDataToApplet(); + std::shared_ptr<IStorage> storage = PopInData(); ASSERT(storage != nullptr); const auto applet_input_data = storage->GetData(); @@ -51,10 +52,6 @@ void Cabinet::Initialize() { sizeof(StartParamForAmiiboSettings)); } -bool Cabinet::TransactionComplete() const { - return is_complete; -} - Result Cabinet::GetStatus() const { return ResultSuccess; } @@ -160,8 +157,8 @@ void Cabinet::DisplayCompleted(bool apply_changes, std::string_view amiibo_name) is_complete = true; - broker.PushNormalDataFromApplet(std::make_shared<IStorage>(system, std::move(out_data))); - broker.SignalStateChanged(); + PushOutData(std::make_shared<IStorage>(system, std::move(out_data))); + Exit(); } void Cabinet::Cancel() { @@ -175,8 +172,8 @@ void Cabinet::Cancel() { is_complete = true; - broker.PushNormalDataFromApplet(std::make_shared<IStorage>(system, std::move(out_data))); - broker.SignalStateChanged(); + PushOutData(std::make_shared<IStorage>(system, std::move(out_data))); + Exit(); } Result Cabinet::RequestExit() { |