yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #228 from Subv/unschedule_events

CoreTiming: Unschedule the pending events when an Interface is destroyed
This commit is contained in:
bunnei 2018-03-04 11:52:08 -05:00 committed by GitHub
commit 3c3d5eeddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -52,7 +52,9 @@ public:
CoreTiming::ScheduleEvent(audio_ticks, audio_event); CoreTiming::ScheduleEvent(audio_ticks, audio_event);
} }
~IAudioOut() = default; ~IAudioOut() {
CoreTiming::UnscheduleEvent(audio_event, 0);
}
private: private:
void StartAudioOut(Kernel::HLERequestContext& ctx) { void StartAudioOut(Kernel::HLERequestContext& ctx) {

View File

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

View File

@ -45,6 +45,10 @@ public:
CoreTiming::ScheduleEvent(pad_update_ticks, pad_update_event); CoreTiming::ScheduleEvent(pad_update_ticks, pad_update_event);
} }
~IAppletResource() {
CoreTiming::UnscheduleEvent(pad_update_event, 0);
}
private: private:
void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 1}; IPC::ResponseBuilder rb{ctx, 2, 1};