diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-29 19:46:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-29 19:46:47 -0400 |
| commit | adb090090605d3b1f4368fb0c7bc836206aa4bdf (patch) | |
| tree | c152945e6c527e90def56460b763c44b7cede53f /src/core/hle/service/hid | |
| parent | 2d608cd62526a0dbde286c80e714d5b24725a8f9 (diff) | |
| parent | 6e883a26da52b84086340ca5b5d38f55ef04bf8d (diff) | |
Merge pull request #11911 from german77/leak_event
core: Close all KEvents
Diffstat (limited to 'src/core/hle/service/hid')
| -rw-r--r-- | src/core/hle/service/hid/controllers/palma.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hidbus/hidbus_base.cpp | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/palma.cpp b/src/core/hle/service/hid/controllers/palma.cpp index 14c67e454..73a2a2b91 100644 --- a/src/core/hle/service/hid/controllers/palma.cpp +++ b/src/core/hle/service/hid/controllers/palma.cpp @@ -19,7 +19,9 @@ Controller_Palma::Controller_Palma(Core::HID::HIDCore& hid_core_, u8* raw_shared operation_complete_event = service_context.CreateEvent("hid:PalmaOperationCompleteEvent"); } -Controller_Palma::~Controller_Palma() = default; +Controller_Palma::~Controller_Palma() { + service_context.CloseEvent(operation_complete_event); +}; void Controller_Palma::OnInit() {} diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 4d70006c1..929dd5f03 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -2757,6 +2757,10 @@ public: joy_detach_event = service_context.CreateEvent("HidSys::JoyDetachEvent"); } + ~HidSys() { + service_context.CloseEvent(joy_detach_event); + }; + private: void ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) { LOG_WARNING(Service_HID, "called"); diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.cpp b/src/core/hle/service/hid/hidbus/hidbus_base.cpp index ee522c36e..8c44f93e8 100644 --- a/src/core/hle/service/hid/hidbus/hidbus_base.cpp +++ b/src/core/hle/service/hid/hidbus/hidbus_base.cpp @@ -13,7 +13,10 @@ HidbusBase::HidbusBase(Core::System& system_, KernelHelpers::ServiceContext& ser : system(system_), service_context(service_context_) { send_command_async_event = service_context.CreateEvent("hidbus:SendCommandAsyncEvent"); } -HidbusBase::~HidbusBase() = default; + +HidbusBase::~HidbusBase() { + service_context.CloseEvent(send_command_async_event); +}; void HidbusBase::ActivateDevice() { if (is_activated) { |
