[MPlayer-cvslog] r31807 - trunk/libvo/vo_corevideo.m

reimar subversion at mplayerhq.hu
Sun Jul 25 13:44:57 CEST 2010


Author: reimar
Date: Sun Jul 25 13:44:57 2010
New Revision: 31807

Log:
Avoid some code duplication in update_screen_info.

Modified:
   trunk/libvo/vo_corevideo.m

Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m	Sun Jul 25 13:38:45 2010	(r31806)
+++ trunk/libvo/vo_corevideo.m	Sun Jul 25 13:44:57 2010	(r31807)
@@ -127,9 +127,12 @@ static void update_screen_info(void)
 		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;


More information about the MPlayer-cvslog mailing list