diff options
author | Ryan Goulden <percontation@gmail.com> | 2014-03-25 19:01:51 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-04-28 21:32:58 +0200 |
commit | 80ec0bac432bb9a059c6d305ed3b6eed1ad08869 (patch) | |
tree | 375cf5588538ab09d9098f4f4b3849f5fb1c2a10 /video/out | |
parent | 4d8489efae382474e963612a82048116a9ac6fa8 (diff) | |
download | mpv-80ec0bac432bb9a059c6d305ed3b6eed1ad08869.tar.bz2 mpv-80ec0bac432bb9a059c6d305ed3b6eed1ad08869.tar.xz |
cocoa: move sync section assignments in vo_control
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/cocoa_common.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 3a00cb9131..d947eee525 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -682,22 +682,22 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) return VO_TRUE; case VOCTRL_GET_WINDOW_SIZE: { int *s = arg; - vo->cocoa->inside_sync_section = true; dispatch_sync(dispatch_get_main_queue(), ^{ + vo->cocoa->inside_sync_section = true; NSSize size = [vo->cocoa->view frame].size; s[0] = size.width; s[1] = size.height; + vo->cocoa->inside_sync_section = false; }); - vo->cocoa->inside_sync_section = false; return VO_TRUE; } case VOCTRL_SET_WINDOW_SIZE: { - vo->cocoa->inside_sync_section = true; dispatch_sync(dispatch_get_main_queue(), ^{ + vo->cocoa->inside_sync_section = true; int *s = arg; [vo->cocoa->window queueNewVideoSize:NSMakeSize(s[0], s[1])]; + vo->cocoa->inside_sync_section = false; }); - vo->cocoa->inside_sync_section = false; return VO_TRUE; } case VOCTRL_SET_CURSOR_VISIBILITY: |