comparison libvo/vo_corevideo.m @ 31740:ede53d2a08eb

Simplify update_screen_info.
author reimar
date Sun, 25 Jul 2010 11:38:45 +0000
parents 923b5da53f65
children 601cd1e830fe
comparison
equal deleted inserted replaced
31739:923b5da53f65 31740:ede53d2a08eb
120 { 120 {
121 if (screen_id == -1 && xinerama_screen > -1) 121 if (screen_id == -1 && xinerama_screen > -1)
122 screen_id = xinerama_screen; 122 screen_id = xinerama_screen;
123 123
124 screen_array = [NSScreen screens]; 124 screen_array = [NSScreen screens];
125 if(screen_id < (int)[screen_array count]) 125 if(screen_id >= (int)[screen_array count])
126 {
127 screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)];
128 }
129 else
130 { 126 {
131 mp_msg(MSGT_VO, MSGL_INFO, "[vo_corevideo] Device ID %d does not exist, falling back to main device\n", screen_id); 127 mp_msg(MSGT_VO, MSGL_INFO, "[vo_corevideo] Device ID %d does not exist, falling back to main device\n", screen_id);
132 screen_handle = [screen_array objectAtIndex:0];
133 screen_id = -1; 128 screen_id = -1;
134 } 129 }
130 screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)];
135 131
136 screen_frame = ![mpGLView window] || screen_id >= 0 ? [screen_handle frame] : [[[mpGLView window] screen] frame]; 132 screen_frame = ![mpGLView window] || screen_id >= 0 ? [screen_handle frame] : [[[mpGLView window] screen] frame];
137 vo_screenwidth = screen_frame.size.width; 133 vo_screenwidth = screen_frame.size.width;
138 vo_screenheight = screen_frame.size.height; 134 vo_screenheight = screen_frame.size.height;
139 xinerama_x = xinerama_y = 0; 135 xinerama_x = xinerama_y = 0;