diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/am/applets/applets.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index becbadd06..47da35537 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp @@ -5,8 +5,9 @@ #include <cstring> #include "common/assert.h" #include "core/core.h" -#include "core/hle/kernel/event.h" +#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/server_port.h" +#include "core/hle/kernel/writable_event.h" #include "core/hle/service/am/am.h" #include "core/hle/service/am/applets/applets.h" @@ -14,11 +15,11 @@ namespace Service::AM::Applets { AppletDataBroker::AppletDataBroker() { auto& kernel = Core::System::GetInstance().Kernel(); - state_changed_event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, - "ILibraryAppletAccessor:StateChangedEvent"); - pop_out_data_event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, - "ILibraryAppletAccessor:PopDataOutEvent"); - pop_interactive_out_data_event = Kernel::Event::Create( + state_changed_event = Kernel::WritableEvent::CreateEventPair( + kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:StateChangedEvent"); + pop_out_data_event = Kernel::WritableEvent::CreateEventPair( + kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:PopDataOutEvent"); + pop_interactive_out_data_event = Kernel::WritableEvent::CreateEventPair( kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:PopInteractiveDataOutEvent"); } @@ -66,7 +67,7 @@ void AppletDataBroker::PushNormalDataFromGame(IStorage storage) { void AppletDataBroker::PushNormalDataFromApplet(IStorage storage) { out_channel.push(std::make_unique<IStorage>(storage)); - pop_out_data_event->Signal(); + pop_out_data_event.writable->Signal(); } void AppletDataBroker::PushInteractiveDataFromGame(IStorage storage) { @@ -75,23 +76,23 @@ void AppletDataBroker::PushInteractiveDataFromGame(IStorage storage) { void AppletDataBroker::PushInteractiveDataFromApplet(IStorage storage) { out_interactive_channel.push(std::make_unique<IStorage>(storage)); - pop_interactive_out_data_event->Signal(); + pop_interactive_out_data_event.writable->Signal(); } void AppletDataBroker::SignalStateChanged() const { - state_changed_event->Signal(); + state_changed_event.writable->Signal(); } -Kernel::SharedPtr<Kernel::Event> AppletDataBroker::GetNormalDataEvent() const { - return pop_out_data_event; +Kernel::SharedPtr<Kernel::ReadableEvent> AppletDataBroker::GetNormalDataEvent() const { + return pop_out_data_event.readable; } -Kernel::SharedPtr<Kernel::Event> AppletDataBroker::GetInteractiveDataEvent() const { - return pop_interactive_out_data_event; +Kernel::SharedPtr<Kernel::ReadableEvent> AppletDataBroker::GetInteractiveDataEvent() const { + return pop_interactive_out_data_event.readable; } -Kernel::SharedPtr<Kernel::Event> AppletDataBroker::GetStateChangedEvent() const { - return state_changed_event; +Kernel::SharedPtr<Kernel::ReadableEvent> AppletDataBroker::GetStateChangedEvent() const { + return state_changed_event.readable; } Applet::Applet() = default; |