diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index c7c93d7f5..39f744e27 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -204,6 +204,7 @@ public: virtual DFrameBuffer* CreateFrameBuffer(); + static void ToggleFullscreen(bool yes); static bool IsFullscreen(); static void UseHiDPI(bool hiDPI); static void SetCursor(NSCursor* cursor); @@ -374,6 +375,14 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer() return fb; } +void CocoaVideo::ToggleFullscreen(bool yes) +{ + if (CocoaVideo* const video = GetInstance()) + { + video->SetMode(yes, video->m_hiDPI); + } +} + bool CocoaVideo::IsFullscreen() { CocoaVideo* const video = GetInstance(); @@ -555,7 +564,7 @@ bool SystemFrameBuffer::IsFullscreen() void SystemFrameBuffer::ToggleFullscreen(bool yes) { - SetMode(...); // todo + CocoaVideo::ToggleFullscreen(yes); }