(Apple) Move get_chosen_screen to apple_gfx_context.c.inl

This commit is contained in:
twinaphex 2014-07-09 13:32:43 +02:00
parent ac18c07e74
commit 063756d5fd
2 changed files with 17 additions and 18 deletions

View File

@ -224,24 +224,6 @@ static bool g_is_syncing = true;
@end
static RAScreen* get_chosen_screen(void)
{
#if defined(OSX) && !defined(MAC_OS_X_VERSION_10_6)
return [NSScreen mainScreen];
#else
NSArray *screens;
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");
return RAScreen.mainScreen;
}
screens = (NSArray*)RAScreen.screens;
return (RAScreen*)[screens objectAtIndex:g_settings.video.monitor_index];
#endif
}
#ifdef IOS
void apple_bind_game_view_fbo(void)
{

View File

@ -1,6 +1,23 @@
#include "../../gfx/gfx_common.h"
#include "../../gfx/gfx_context.h"
static RAScreen* get_chosen_screen(void)
{
#if defined(OSX) && !defined(MAC_OS_X_VERSION_10_6)
return [NSScreen mainScreen];
#else
NSArray *screens;
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");
return RAScreen.mainScreen;
}
screens = (NSArray*)RAScreen.screens;
return (RAScreen*)[screens objectAtIndex:g_settings.video.monitor_index];
#endif
}
static bool apple_gfx_ctx_init(void *data)
{
(void)data;