diff options
author | Anton Fedchin <anightik@gmail.com> | 2018-03-19 09:12:54 +0300 |
---|---|---|
committer | Anton Fedchin <anightik@gmail.com> | 2018-03-19 09:12:54 +0300 |
commit | 7da7e2f668570a9cb68ed7985265b9f7ee9f8a6a (patch) | |
tree | f12e625a0c7b492717ee2b4ed31e84d1aee8508b | |
parent | 57e70afe040d2cd91709ca7470803d5248929f7f (diff) |
[win32] windowing: resize dx buffers after resolution change to avoid black screen after fall creators update.
-rw-r--r-- | xbmc/windowing/windows/WinSystemWin32.h | 2 | ||||
-rw-r--r-- | xbmc/windowing/windows/WinSystemWin32DX.cpp | 9 | ||||
-rw-r--r-- | xbmc/windowing/windows/WinSystemWin32DX.h | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/xbmc/windowing/windows/WinSystemWin32.h b/xbmc/windowing/windows/WinSystemWin32.h index 3d738fb358..072594b05f 100644 --- a/xbmc/windowing/windows/WinSystemWin32.h +++ b/xbmc/windowing/windows/WinSystemWin32.h @@ -228,7 +228,7 @@ protected: virtual void Register(IDispResource *resource); virtual void Unregister(IDispResource *resource); - bool ChangeResolution(const RESOLUTION_INFO& res, bool forceChange = false); + virtual bool ChangeResolution(const RESOLUTION_INFO& res, bool forceChange = false); virtual bool UpdateResolutionsInternal(); virtual bool CreateBlankWindows(); virtual bool BlankNonActiveMonitors(bool bBlank); diff --git a/xbmc/windowing/windows/WinSystemWin32DX.cpp b/xbmc/windowing/windows/WinSystemWin32DX.cpp index 59a447f144..e6d1ede941 100644 --- a/xbmc/windowing/windows/WinSystemWin32DX.cpp +++ b/xbmc/windowing/windows/WinSystemWin32DX.cpp @@ -180,6 +180,15 @@ void CWinSystemWin32DX::OnScreenChange(int screen) } } +bool CWinSystemWin32DX::ChangeResolution(const RESOLUTION_INFO &res, bool forceChange) +{ + bool changed = CWinSystemWin32::ChangeResolution(res, forceChange); + // this is a try to fix FCU issue after changing resolution + if (m_deviceResources && changed) + m_deviceResources->ResizeBuffers(); + return changed; +} + void CWinSystemWin32DX::OnResize(int width, int height) { if (!m_IsAlteringWindow) diff --git a/xbmc/windowing/windows/WinSystemWin32DX.h b/xbmc/windowing/windows/WinSystemWin32DX.h index 6a908d553b..86d214051f 100644 --- a/xbmc/windowing/windows/WinSystemWin32DX.h +++ b/xbmc/windowing/windows/WinSystemWin32DX.h @@ -85,6 +85,7 @@ protected: void ResizeDeviceBuffers() override; bool IsStereoEnabled() override; void OnScreenChange(int screen) override; + bool ChangeResolution(const RESOLUTION_INFO& res, bool forceChange = false) override; HMODULE m_hDriverModule; TRACED_HOOK_HANDLE m_hHook; |