services: am: Clear events on PopOutData and PopInteractiveOutData.
This commit is contained in:
@@ -778,11 +778,9 @@ private:
|
||||
void GetAppletStateChangedEvent(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_AM, "called");
|
||||
|
||||
const auto event = applet->GetBroker().GetStateChangedEvent();
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushCopyObjects(event);
|
||||
rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent()->GetReadableEvent());
|
||||
}
|
||||
|
||||
void IsCompleted(Kernel::HLERequestContext& ctx) {
|
||||
@@ -836,6 +834,8 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
applet->GetBroker().GetNormalDataEvent()->Clear();
|
||||
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushIpcInterface<IStorage>(std::move(*storage));
|
||||
}
|
||||
@@ -868,6 +868,8 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
applet->GetBroker().GetInteractiveDataEvent()->Clear();
|
||||
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushIpcInterface<IStorage>(std::move(*storage));
|
||||
}
|
||||
@@ -877,7 +879,7 @@ private:
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent());
|
||||
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent()->GetReadableEvent());
|
||||
}
|
||||
|
||||
void GetPopInteractiveOutDataEvent(Kernel::HLERequestContext& ctx) {
|
||||
@@ -885,7 +887,7 @@ private:
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent());
|
||||
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent()->GetReadableEvent());
|
||||
}
|
||||
|
||||
std::shared_ptr<Applets::Applet> applet;
|
||||
|
||||
@@ -108,16 +108,16 @@ void AppletDataBroker::SignalStateChanged() const {
|
||||
state_changed_event.writable->Signal();
|
||||
}
|
||||
|
||||
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetNormalDataEvent() const {
|
||||
return pop_out_data_event.readable;
|
||||
std::shared_ptr<Kernel::WritableEvent> AppletDataBroker::GetNormalDataEvent() const {
|
||||
return pop_out_data_event.writable;
|
||||
}
|
||||
|
||||
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetInteractiveDataEvent() const {
|
||||
return pop_interactive_out_data_event.readable;
|
||||
std::shared_ptr<Kernel::WritableEvent> AppletDataBroker::GetInteractiveDataEvent() const {
|
||||
return pop_interactive_out_data_event.writable;
|
||||
}
|
||||
|
||||
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetStateChangedEvent() const {
|
||||
return state_changed_event.readable;
|
||||
std::shared_ptr<Kernel::WritableEvent> AppletDataBroker::GetStateChangedEvent() const {
|
||||
return state_changed_event.writable;
|
||||
}
|
||||
|
||||
Applet::Applet(Kernel::KernelCore& kernel_) : broker{kernel_} {}
|
||||
|
||||
@@ -86,9 +86,9 @@ public:
|
||||
|
||||
void SignalStateChanged() const;
|
||||
|
||||
std::shared_ptr<Kernel::ReadableEvent> GetNormalDataEvent() const;
|
||||
std::shared_ptr<Kernel::ReadableEvent> GetInteractiveDataEvent() const;
|
||||
std::shared_ptr<Kernel::ReadableEvent> GetStateChangedEvent() const;
|
||||
std::shared_ptr<Kernel::WritableEvent> GetNormalDataEvent() const;
|
||||
std::shared_ptr<Kernel::WritableEvent> GetInteractiveDataEvent() const;
|
||||
std::shared_ptr<Kernel::WritableEvent> GetStateChangedEvent() const;
|
||||
|
||||
private:
|
||||
// Queues are named from applet's perspective
|
||||
|
||||
Reference in New Issue
Block a user