diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2019-10-24 20:44:53 +0200 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2019-10-24 20:50:47 +0200 |
commit | 1898f0d7385f9b25bf77052b7df314646570990a (patch) | |
tree | 2f1df4fead6fc3e5e659d458ac580fbe52ccfa9b | |
parent | a8f1ea7f3814e83c160c0af981ef35cf2684130a (diff) |
[macos] Improve and fix the fix for only quarter of screen rendered in windowed mode and certain fullscreen resolutions on macOS 10.15 (Catalina).
-rw-r--r-- | xbmc/windowing/osx/WinSystemOSX.mm | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/xbmc/windowing/osx/WinSystemOSX.mm b/xbmc/windowing/osx/WinSystemOSX.mm index 9e63dd9320..8797608b67 100644 --- a/xbmc/windowing/osx/WinSystemOSX.mm +++ b/xbmc/windowing/osx/WinSystemOSX.mm @@ -784,14 +784,7 @@ bool CWinSystemOSX::CreateNewWindow(const std::string& name, bool fullScreen, RE if (!view) return false; - if (CDisplaySettings::GetInstance().GetCurrentResolution() == RES_WINDOW) - { - // It seems, that in macOS 10.15 this defaults to YES, but we currently do not support - // Retina resolutions properly. Ensure that the view created by SDL uses a 1 pixel per - // point framebuffer. - view.wantsBestResolutionOpenGLSurface = NO; - } - else + if (CDisplaySettings::GetInstance().GetCurrentResolution() != RES_WINDOW) { // If we are not starting up windowed, then hide the initial SDL window // so we do not see it flash before the fade-out and switch to fullscreen. @@ -875,6 +868,14 @@ bool CWinSystemOSX::ResizeWindow(int newWidth, int newHeight, int newLeft, int n NSWindow* window; view = [context view]; + + if (view) + { + // It seems, that in macOS 10.15 this defaults to YES, but we currently do not support + // Retina resolutions properly. Ensure that the view uses a 1 pixel per point framebuffer. + view.wantsBestResolutionOpenGLSurface = NO; + } + if (view && (newWidth > 0) && (newHeight > 0)) { window = [view window]; @@ -1017,10 +1018,6 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl [windowedFullScreenwindow update]; [blankView setFrameSize:NSMakeSize(m_nWidth, m_nHeight)]; - // It seems, that in macOS 10.15 this defaults to YES, but we currently do not support - // Retina resolutions properly. Thus, ensure that we get a 1 pixel per point framebuffer. - blankView.wantsBestResolutionOpenGLSurface = NO; - // Obtain windowed pixel format and create a new context. newContext = (NSOpenGLContext*)CreateWindowedContext((void* )cur_context); [newContext setView:blankView]; |