changeset 31740:ede53d2a08eb

Simplify update_screen_info.
author reimar
date Sun, 25 Jul 2010 11:38:45 +0000
parents 923b5da53f65
children 601cd1e830fe
files libvo/vo_corevideo.m
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.m	Sun Jul 25 11:19:41 2010 +0000
+++ b/libvo/vo_corevideo.m	Sun Jul 25 11:38:45 2010 +0000
@@ -122,16 +122,12 @@
 		screen_id = xinerama_screen;
 
 	screen_array = [NSScreen screens];
-	if(screen_id < (int)[screen_array count])
-	{
-		screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)];
-	}
-	else
+	if(screen_id >= (int)[screen_array count])
 	{
 		mp_msg(MSGT_VO, MSGL_INFO, "[vo_corevideo] Device ID %d does not exist, falling back to main device\n", screen_id);
-		screen_handle = [screen_array objectAtIndex:0];
 		screen_id = -1;
 	}
+	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];
 	vo_screenwidth = screen_frame.size.width;