Просмотр исходного кода

CoreTiming: Unschedule the pending events when an Interface is destroyed.

Subv 8 лет назад
Родитель
Сommit
248881fa7f

+ 3 - 1
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) {

+ 3 - 1
src/core/hle/service/audio/audren_u.cpp

@@ -45,7 +45,9 @@ public:
         // Start the audio event
         CoreTiming::ScheduleEvent(audio_ticks, audio_event);
     }
-    ~IAudioRenderer() = default;
+    ~IAudioRenderer() {
+        CoreTiming::UnscheduleEvent(audio_event, 0);
+    }
 
 private:
     void UpdateAudioCallback() {

+ 4 - 0
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};