Fix T69355: Closing window stops video but not audio

This commit is contained in:
Campbell Barton 2019-09-20 16:37:07 +10:00
parent 01cb4f9862
commit cd236bc22d
Notes: blender-bot 2023-02-14 09:48:25 +01:00
Referenced by issue #69355, Closing window stops video playback but not audio
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,7 @@
#include "BKE_node.h"
#include "BKE_screen.h"
#include "BKE_scene.h"
#include "BKE_sound.h"
#include "BKE_workspace.h"
#include "WM_api.h"
@ -583,6 +584,11 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
if (screen->animtimer) {
WM_event_remove_timer(wm, window, screen->animtimer);
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
Scene *scene = WM_window_get_active_scene(prevwin);
Scene *scene_eval = (Scene *)DEG_get_evaluated_id(depsgraph, &scene->id);
BKE_sound_stop_scene(scene_eval);
}
screen->animtimer = NULL;
screen->scrubbing = false;