# HG changeset patch # User reimar # Date 1280058297 0 # Node ID 601cd1e830fec9e66f66052b57cda873eecb8398 # Parent ede53d2a08eb3e8cca24bca880124dd2c3c8f390 Avoid some code duplication in update_screen_info. diff -r ede53d2a08eb -r 601cd1e830fe libvo/vo_corevideo.m --- a/libvo/vo_corevideo.m Sun Jul 25 11:38:45 2010 +0000 +++ b/libvo/vo_corevideo.m Sun Jul 25 11:44:57 2010 +0000 @@ -127,9 +127,12 @@ mp_msg(MSGT_VO, MSGL_INFO, "[vo_corevideo] Device ID %d does not exist, falling back to main device\n", screen_id); screen_id = -1; } + if (screen_id < 0 && [mpGLView window]) + screen_handle = [[mpGLView window] screen]; + else screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)]; - screen_frame = ![mpGLView window] || screen_id >= 0 ? [screen_handle frame] : [[[mpGLView window] screen] frame]; + screen_frame = [screen_handle frame]; vo_screenwidth = screen_frame.size.width; vo_screenheight = screen_frame.size.height; xinerama_x = xinerama_y = 0;