mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 11:01:35 +00:00
cocoa_common: save vo struct earlier in the startup process
This prevents a crash with -fs option.
This commit is contained in:
parent
e6a6a60276
commit
3043690756
@ -370,6 +370,7 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
|||||||
[s->window setAcceptsMouseMovedEvents:YES];
|
[s->window setAcceptsMouseMovedEvents:YES];
|
||||||
[s->glContext setView:glView];
|
[s->glContext setView:glView];
|
||||||
[s->glContext makeCurrentContext];
|
[s->glContext makeCurrentContext];
|
||||||
|
[s->window setVideoOutput:vo];
|
||||||
|
|
||||||
[NSApp setDelegate:s->window];
|
[NSApp setDelegate:s->window];
|
||||||
[s->window setDelegate:s->window];
|
[s->window setDelegate:s->window];
|
||||||
@ -477,7 +478,6 @@ int vo_cocoa_check_events(struct vo *vo)
|
|||||||
inMode:NSEventTrackingRunLoopMode dequeue:YES];
|
inMode:NSEventTrackingRunLoopMode dequeue:YES];
|
||||||
if (event == nil)
|
if (event == nil)
|
||||||
return 0;
|
return 0;
|
||||||
[s->window setVideoOutput:vo];
|
|
||||||
[NSApp sendEvent:event];
|
[NSApp sendEvent:event];
|
||||||
|
|
||||||
if (s->did_resize) {
|
if (s->did_resize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user