(Apple) Cleanups to get_chosen_screen

This commit is contained in:
twinaphex 2014-07-09 13:34:50 +02:00
parent 063756d5fd
commit b6c17a79bb

View File

@ -6,15 +6,13 @@ static RAScreen* get_chosen_screen(void)
#if defined(OSX) && !defined(MAC_OS_X_VERSION_10_6) #if defined(OSX) && !defined(MAC_OS_X_VERSION_10_6)
return [NSScreen mainScreen]; return [NSScreen mainScreen];
#else #else
NSArray *screens;
if (g_settings.video.monitor_index >= RAScreen.screens.count) if (g_settings.video.monitor_index >= RAScreen.screens.count)
{ {
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n"); RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
return RAScreen.mainScreen; return RAScreen.mainScreen;
} }
screens = (NSArray*)RAScreen.screens; return (RAScreen*)[RAScreen.screens objectAtIndex:g_settings.video.monitor_index];
return (RAScreen*)[screens objectAtIndex:g_settings.video.monitor_index];
#endif #endif
} }