mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Fix for fullscreen GL driver in Metal OSX build
After calling enterFullScreenMode on the GL view, it becomes the "key" window, meaning it gets all of the input. This is problematic as that view doesn't forward the input on to the input driver.
This commit is contained in:
parent
59cbb16f1c
commit
860ffb2b6a
@ -420,6 +420,9 @@ static bool cocoa_gl_gfx_ctx_set_video_mode(void *data,
|
||||
if (!has_went_fullscreen)
|
||||
{
|
||||
[g_view enterFullScreenMode:(BRIDGE NSScreen *)cocoa_screen_get_chosen() withOptions:nil];
|
||||
#ifdef HAVE_COCOA_METAL
|
||||
[apple_platform setupMainWindow];
|
||||
#endif
|
||||
cocoa_show_mouse(data, false);
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
* the displays should not sleep.
|
||||
*/
|
||||
- (bool)setDisableDisplaySleep:(bool)disable;
|
||||
- (void)setupMainWindow;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
@ -565,8 +565,7 @@ static ui_application_t ui_application_cocoa = {
|
||||
waiting_argc = 0;
|
||||
|
||||
#ifdef HAVE_COCOA_METAL
|
||||
[self.window makeMainWindow];
|
||||
[self.window makeKeyWindow];
|
||||
[self setupMainWindow];
|
||||
#endif
|
||||
|
||||
[self performSelectorOnMainThread:@selector(rarch_main) withObject:nil waitUntilDone:NO];
|
||||
@ -575,6 +574,12 @@ static ui_application_t ui_application_cocoa = {
|
||||
#pragma mark - ApplePlatform
|
||||
|
||||
#ifdef HAVE_COCOA_METAL
|
||||
- (void)setupMainWindow
|
||||
{
|
||||
[self.window makeMainWindow];
|
||||
[self.window makeKeyWindow];
|
||||
}
|
||||
|
||||
- (void)setViewType:(apple_view_type_t)vt
|
||||
{
|
||||
if (vt == _vt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user