yuzu-emu
/
yuzu
Archived
1
0
Fork 0

core: Close all KEvents

This commit is contained in:
german77 2023-10-29 13:45:53 -06:00
parent 43be2bfe33
commit 6e883a26da
6 changed files with 26 additions and 5 deletions

View File

@ -796,7 +796,9 @@ ILockAccessor::ILockAccessor(Core::System& system_)
lock_event = service_context.CreateEvent("ILockAccessor::LockEvent"); lock_event = service_context.CreateEvent("ILockAccessor::LockEvent");
} }
ILockAccessor::~ILockAccessor() = default; ILockAccessor::~ILockAccessor() {
service_context.CloseEvent(lock_event);
};
void ILockAccessor::TryLock(HLERequestContext& ctx) { void ILockAccessor::TryLock(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
@ -909,7 +911,9 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
msg_queue->PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground); msg_queue->PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground);
} }
ICommonStateGetter::~ICommonStateGetter() = default; ICommonStateGetter::~ICommonStateGetter() {
service_context.CloseEvent(sleep_lock_event);
};
void ICommonStateGetter::GetBootMode(HLERequestContext& ctx) { void ICommonStateGetter::GetBootMode(HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called"); LOG_DEBUG(Service_AM, "called");

View File

@ -25,7 +25,9 @@ Cabinet::Cabinet(Core::System& system_, LibraryAppletMode applet_mode_,
service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent"); service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent");
} }
Cabinet::~Cabinet() = default; Cabinet::~Cabinet() {
service_context.CloseEvent(availability_change_event);
};
void Cabinet::Initialize() { void Cabinet::Initialize() {
Applet::Initialize(); Applet::Initialize();

View File

@ -19,7 +19,9 @@ Controller_Palma::Controller_Palma(Core::HID::HIDCore& hid_core_, u8* raw_shared
operation_complete_event = service_context.CreateEvent("hid:PalmaOperationCompleteEvent"); 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() {} void Controller_Palma::OnInit() {}

View File

@ -2757,6 +2757,10 @@ public:
joy_detach_event = service_context.CreateEvent("HidSys::JoyDetachEvent"); joy_detach_event = service_context.CreateEvent("HidSys::JoyDetachEvent");
} }
~HidSys() {
service_context.CloseEvent(joy_detach_event);
};
private: private:
void ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) { void ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) {
LOG_WARNING(Service_HID, "called"); LOG_WARNING(Service_HID, "called");

View File

@ -13,7 +13,10 @@ HidbusBase::HidbusBase(Core::System& system_, KernelHelpers::ServiceContext& ser
: system(system_), service_context(service_context_) { : system(system_), service_context(service_context_) {
send_command_async_event = service_context.CreateEvent("hidbus:SendCommandAsyncEvent"); send_command_async_event = service_context.CreateEvent("hidbus:SendCommandAsyncEvent");
} }
HidbusBase::~HidbusBase() = default;
HidbusBase::~HidbusBase() {
service_context.CloseEvent(send_command_async_event);
};
void HidbusBase::ActivateDevice() { void HidbusBase::ActivateDevice() {
if (is_activated) { if (is_activated) {

View File

@ -141,6 +141,12 @@ public:
service_context.CreateEvent("IParentalControlService::RequestSuspensionEvent"); service_context.CreateEvent("IParentalControlService::RequestSuspensionEvent");
} }
~IParentalControlService() {
service_context.CloseEvent(synchronization_event);
service_context.CloseEvent(unlinked_event);
service_context.CloseEvent(request_suspension_event);
};
private: private:
bool CheckFreeCommunicationPermissionImpl() const { bool CheckFreeCommunicationPermissionImpl() const {
if (states.temporary_unlocked) { if (states.temporary_unlocked) {