From fadcee14f8fca1b76b4ea48b1cfd136ccae8d182 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 28 Sep 2021 23:42:50 -0400 Subject: service: Replace service event creation with ServiceContext::CreateEvent The service context helps to manage all created events and allows us to close them upon destruction. --- src/core/hle/service/nfp/nfp.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/nfp/nfp.h') diff --git a/src/core/hle/service/nfp/nfp.h b/src/core/hle/service/nfp/nfp.h index 5e4e49bc6..95c127efb 100644 --- a/src/core/hle/service/nfp/nfp.h +++ b/src/core/hle/service/nfp/nfp.h @@ -7,7 +7,7 @@ #include #include -#include "core/hle/kernel/k_event.h" +#include "core/hle/service/kernel_helpers.h" #include "core/hle/service/service.h" namespace Kernel { @@ -42,12 +42,13 @@ public: Kernel::KReadableEvent& GetNFCEvent(); const AmiiboFile& GetAmiiboBuffer() const; - private: - Kernel::KEvent nfc_tag_load; - AmiiboFile amiibo{}; - protected: std::shared_ptr module; + + private: + KernelHelpers::ServiceContext service_context; + Kernel::KEvent* nfc_tag_load; + AmiiboFile amiibo{}; }; }; -- cgit v1.2.3