mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
(OSX) Add proper full screen tracking
This commit is contained in:
parent
253bb88bfc
commit
6372e755c4
@ -312,6 +312,31 @@ void *apple_get_proc_address(const char *symbol_name)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool apple_set_video_mode(unsigned width, unsigned height, bool fullscreen)
|
||||
{
|
||||
__block bool result = true;
|
||||
|
||||
#ifdef OSX
|
||||
dispatch_sync(dispatch_get_main_queue(),
|
||||
^{
|
||||
// TODO: Multi-monitor support
|
||||
// TODO: Sceen mode support
|
||||
|
||||
if (fullscreen)
|
||||
result = [g_view enterFullScreenMode:[NSScreen mainScreen] withOptions:nil];
|
||||
else
|
||||
{
|
||||
[g_view exitFullScreenModeWithOptions:nil];
|
||||
[g_view.window makeFirstResponder:g_view];
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
// TODO: Maybe iOS users should be apple to show/hide the status bar here?
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef IOS
|
||||
void apple_bind_game_view_fbo(void)
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ void apple_rarch_exited (void* result);
|
||||
// These functions must only be called in gfx/context/ioseagl_ctx.c
|
||||
bool apple_init_game_view(void);
|
||||
void apple_destroy_game_view(void);
|
||||
bool apple_set_video_mode(unsigned width, unsigned height, bool fullscreen);
|
||||
void apple_flip_game_view(void);
|
||||
void apple_set_game_view_sync(unsigned interval);
|
||||
void apple_get_game_view_size(unsigned *width, unsigned *height);
|
||||
|
@ -42,10 +42,7 @@ static bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
(void)width;
|
||||
(void)height;
|
||||
(void)fullscreen;
|
||||
return true;
|
||||
return apple_set_video_mode(width, height, fullscreen);
|
||||
}
|
||||
|
||||
static void gfx_ctx_update_window_title(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user