(OSX) Don't leak memory for NSScreen objects
This commit is contained in:
parent
fb38aafaa3
commit
a0e8f7ce13
|
@ -223,13 +223,16 @@ static RAScreen* get_chosen_screen()
|
||||||
{
|
{
|
||||||
unsigned monitor = g_settings.video.monitor_index;
|
unsigned monitor = g_settings.video.monitor_index;
|
||||||
|
|
||||||
if (monitor >= RAScreen.screens.count)
|
@autoreleasepool
|
||||||
{
|
{
|
||||||
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
|
if (monitor >= RAScreen.screens.count)
|
||||||
return RAScreen.mainScreen;
|
{
|
||||||
}
|
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
|
||||||
|
return RAScreen.mainScreen;
|
||||||
|
}
|
||||||
|
|
||||||
return RAScreen.screens[monitor];
|
return RAScreen.screens[monitor];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apple_gfx_ctx_init()
|
bool apple_gfx_ctx_init()
|
||||||
|
|
Loading…
Reference in New Issue