diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-27 15:18:29 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-29 14:48:40 +0100 |
commit | a342bcc9b130e9bd78720e09e04c92dcac8840d0 (patch) | |
tree | df1d16c2a71b121fc449b53fc931c6fac8ccf82a /src/core/hle/service/nim/nim.cpp | |
parent | core: Port all current usages of Event to Readable/WritableEvent (diff) | |
download | yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar.gz yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar.bz2 yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar.lz yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar.xz yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.tar.zst yuzu-a342bcc9b130e9bd78720e09e04c92dcac8840d0.zip |
Diffstat (limited to 'src/core/hle/service/nim/nim.cpp')
-rw-r--r-- | src/core/hle/service/nim/nim.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index d181a781c..0dabcd23b 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp @@ -140,19 +140,18 @@ public: RegisterHandlers(functions); auto& kernel = Core::System::GetInstance().Kernel(); - finished_event = Kernel::WritableEvent::CreateRegisteredEventPair( + finished_event = Kernel::WritableEvent::CreateEventPair( kernel, Kernel::ResetType::OneShot, "IEnsureNetworkClockAvailabilityService:FinishEvent"); } private: - Kernel::SharedPtr<Kernel::WritableEvent> finished_event; + Kernel::EventPair finished_event; void StartTask(Kernel::HLERequestContext& ctx) { // No need to connect to the internet, just finish the task straight away. LOG_DEBUG(Service_NIM, "called"); - - finished_event->Signal(); + finished_event.writable->Signal(); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); } @@ -162,9 +161,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - const auto& event{Core::System::GetInstance().Kernel().FindNamedEvent( - "IEnsureNetworkClockAvailabilityService:FinishEvent")}; - rb.PushCopyObjects(event->second); + rb.PushCopyObjects(finished_event.readable); } void GetResult(Kernel::HLERequestContext& ctx) { @@ -176,8 +173,7 @@ private: void Cancel(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_NIM, "called"); - - finished_event->Clear(); + finished_event.writable->Clear(); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); } |