diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -200,6 +200,8 @@ const char *VideoDriver_Cocoa::Start(con /* Don't create a window or enter fullscreen if we're just going to show a dialog. */ if (!CocoaSetupApplication()) return NULL; + this->UpdateAutoResolution(); + this->orig_res = _cur_resolution; int width = _cur_resolution.width; int height = _cur_resolution.height; @@ -303,6 +305,15 @@ void VideoDriver_Cocoa::EditBoxLostFocus } /** + * Get the resolution of the main screen. + */ +Dimension VideoDriver_Cocoa::GetScreenSize() const +{ + NSRect frame = [ [ NSScreen mainScreen ] frame ]; + return { static_cast(NSWidth(frame)), static_cast(NSHeight(frame)) }; +} + +/** * Handle a change of the display area. */ void VideoDriver_Cocoa::GameSizeChanged()