summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nifm/nifm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nifm/nifm.cpp')
-rw-r--r--src/core/hle/service/nifm/nifm.cpp13
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> {