VERY experimental Nintendo Switch 2 emulator
C++
CoreTiming: Unschedule the pending events when an Interface is destroyed.
Subv6ac79e3a4316
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cppindex 780a4e6e5f..e873d768fc 100644--- a/src/core/hle/service/audio/audout_u.cpp+++ b/src/core/hle/service/audio/audout_u.cpp@@ -52,7 +52,9 @@ public:CoreTiming::ScheduleEvent(audio_ticks, audio_event);}- ~IAudioOut() = default;+ ~IAudioOut() {+ CoreTiming::UnscheduleEvent(audio_event, 0);+ }private:void StartAudioOut(Kernel::HLERequestContext& ctx) {diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cppindex dda135d180..1cbca6c4bb 100644--- a/src/core/hle/service/audio/audren_u.cpp+++ b/src/core/hle/service/audio/audren_u.cpp@@ -45,7 +45,9 @@ public:// Start the audio eventCoreTiming::ScheduleEvent(audio_ticks, audio_event);}- ~IAudioRenderer() = default;+ ~IAudioRenderer() {+ CoreTiming::UnscheduleEvent(audio_event, 0);+ }private:void UpdateAudioCallback() {diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cppindex dacd1862df..7e04ad8d44 100644--- a/src/core/hle/service/hid/hid.cpp+++ b/src/core/hle/service/hid/hid.cpp@@ -45,6 +45,10 @@ public:CoreTiming::ScheduleEvent(pad_update_ticks, pad_update_event);}+ ~IAppletResource() {+ CoreTiming::UnscheduleEvent(pad_update_event, 0);+ }+private:void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {IPC::ResponseBuilder rb{ctx, 2, 1};