diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-04 09:56:09 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:50 +0200 |
commit | addc0bf0379e075786048921bede6e089552a6db (patch) | |
tree | 7fa8819b52db29e1b354410441dd8f2438e2ed4a /src/core/hle/service/nifm/nifm.cpp | |
parent | hle: kernel: Migrate KSharedMemory to KAutoObject. (diff) | |
download | yuzu-addc0bf0379e075786048921bede6e089552a6db.tar yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.gz yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.bz2 yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.lz yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.xz yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.zst yuzu-addc0bf0379e075786048921bede6e089552a6db.zip |
Diffstat (limited to 'src/core/hle/service/nifm/nifm.cpp')
-rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 9f110df8e..fe1c25757 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -127,7 +127,8 @@ public: class IRequest final : public ServiceFramework<IRequest> { public: - explicit IRequest(Core::System& system_) : ServiceFramework{system_, "IRequest"} { + explicit IRequest(Core::System& system_) + : ServiceFramework{system_, "IRequest"}, event1{system.Kernel()}, event2{system.Kernel()} { static const FunctionInfo functions[] = { {0, &IRequest::GetRequestState, "GetRequestState"}, {1, &IRequest::GetResult, "GetResult"}, @@ -159,10 +160,8 @@ public: auto& kernel = system.Kernel(); - event1 = Kernel::KEvent::Create(kernel, "IRequest:Event1"); - event1->Initialize(); - event2 = Kernel::KEvent::Create(kernel, "IRequest:Event2"); - event2->Initialize(); + event1.Initialize("IRequest:Event1"); + event2.Initialize("IRequest:Event2"); } private: @@ -198,7 +197,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 2}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(event1->GetReadableEvent(), event2->GetReadableEvent()); + rb.PushCopyObjects(event1.GetReadableEvent(), event2.GetReadableEvent()); } void Cancel(Kernel::HLERequestContext& ctx) { @@ -229,7 +228,7 @@ private: rb.Push<u32>(0); } - std::shared_ptr<Kernel::KEvent> event1, event2; + Kernel::KEvent event1, event2; }; class INetworkProfile final : public ServiceFramework<INetworkProfile> { |