diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2017-11-13 19:01:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 19:01:10 +0100 |
commit | 21cc9955d88fc8d39785ecb792213fbec66feb19 (patch) | |
tree | 915dd4bdff9376db23350989a4223c7297b86235 | |
parent | 9672610081c087e906b104b047fbdfe280237884 (diff) | |
parent | 74bf405a3a9d738297de0c639497b82a2dd5425b (diff) |
Merge pull request #13045 from Rechi/fixOsxFlushBufferKrypton
[backport] osx: fix high cpu usage when obscured
-rw-r--r-- | xbmc/windowing/osx/WinSystemOSXGL.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xbmc/windowing/osx/WinSystemOSXGL.mm b/xbmc/windowing/osx/WinSystemOSXGL.mm index c7bfca3dfa..e9e5f4158e 100644 --- a/xbmc/windowing/osx/WinSystemOSXGL.mm +++ b/xbmc/windowing/osx/WinSystemOSXGL.mm @@ -42,6 +42,11 @@ void CWinSystemOSXGL::PresentRenderImpl(bool rendered) if (rendered) FlushBuffer(); + // FlushBuffer does not block if window is obscured + // in this case we need to throttle the render loop + if (IsObscured()) + usleep(10000); + if (m_delayDispReset && m_dispResetTimer.IsTimePast()) { m_delayDispReset = false; |