summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/friend/friend.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-04 09:56:09 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commitaddc0bf0379e075786048921bede6e089552a6db (patch)
tree7fa8819b52db29e1b354410441dd8f2438e2ed4a /src/core/hle/service/friend/friend.cpp
parenthle: kernel: Migrate KSharedMemory to KAutoObject. (diff)
downloadyuzu-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/friend/friend.cpp')
-rw-r--r--src/core/hle/service/friend/friend.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index a35979053..526b0f896 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -185,7 +185,8 @@ private:
class INotificationService final : public ServiceFramework<INotificationService> {
public:
explicit INotificationService(Common::UUID uuid_, Core::System& system_)
- : ServiceFramework{system_, "INotificationService"}, uuid{uuid_} {
+ : ServiceFramework{system_, "INotificationService"}, uuid{uuid_}, notification_event{
+ system.Kernel()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &INotificationService::GetEvent, "GetEvent"},
@@ -196,9 +197,7 @@ public:
RegisterHandlers(functions);
- notification_event =
- Kernel::KEvent::Create(system.Kernel(), "INotificationService:NotifyEvent");
- notification_event->Initialize();
+ notification_event.Initialize("INotificationService:NotifyEvent");
}
private:
@@ -207,7 +206,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(notification_event->GetReadableEvent());
+ rb.PushCopyObjects(notification_event.GetReadableEvent());
}
void Clear(Kernel::HLERequestContext& ctx) {
@@ -273,7 +272,7 @@ private:
};
Common::UUID uuid{Common::INVALID_UUID};
- std::shared_ptr<Kernel::KEvent> notification_event;
+ Kernel::KEvent notification_event;
std::queue<SizedNotificationInfo> notifications;
States states{};
};