changeset 31741:601cd1e830fe

Avoid some code duplication in update_screen_info.
author reimar
date Sun, 25 Jul 2010 11:44:57 +0000
parents ede53d2a08eb
children 8c22970585a7
files libvo/vo_corevideo.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;