1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00

cocoa_common: save vo struct earlier in the startup process

This prevents a crash with -fs option.
This commit is contained in:
Stefano Pigozzi 2012-11-05 07:45:54 +01:00
parent e6a6a60276
commit 3043690756

View File

@ -370,6 +370,7 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
[s->window setAcceptsMouseMovedEvents:YES];
[s->glContext setView:glView];
[s->glContext makeCurrentContext];
[s->window setVideoOutput:vo];
[NSApp setDelegate:s->window];
[s->window setDelegate:s->window];
@ -477,7 +478,6 @@ int vo_cocoa_check_events(struct vo *vo)
inMode:NSEventTrackingRunLoopMode dequeue:YES];
if (event == nil)
return 0;
[s->window setVideoOutput:vo];
[NSApp sendEvent:event];
if (s->did_resize) {