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.
This commit is contained in:
Morph
2021-09-28 23:42:50 -04:00
parent 3a33519598
commit fadcee14f8
26 changed files with 367 additions and 271 deletions

View File

@@ -7,7 +7,7 @@
#include <array>
#include <vector>
#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> module;
private:
KernelHelpers::ServiceContext service_context;
Kernel::KEvent* nfc_tag_load;
AmiiboFile amiibo{};
};
};