diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index fa23742ecf9b0..f7773f2f5909a 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -295,7 +295,9 @@ CActiveAE::~CActiveAE() void CActiveAE::Dispose() { +#if defined(HAS_GLX) || defined(TARGET_DARWIN) g_Windowing.Unregister(this); +#endif m_bStop = true; m_outMsgEvent.Set(); @@ -2613,7 +2615,9 @@ bool CActiveAE::Initialize() } // hook into windowing for receiving display reset events +#if defined(HAS_GLX) || defined(TARGET_DARWIN) g_Windowing.Register(this); +#endif m_inMsgEvent.Reset(); return true; diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h index 1dba0313086a5..da5a33d92d68c 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h @@ -223,7 +223,11 @@ class CEngineStats std::vector m_streamStats; }; +#if defined(HAS_GLX) || defined(TARGET_DARWIN) class CActiveAE : public IAE, public IDispResource, private CThread +#else +class CActiveAE : public IAE, private CThread +#endif { protected: friend class ::CAEFactory; diff --git a/xbmc/windowing/egl/WinSystemEGL.cpp b/xbmc/windowing/egl/WinSystemEGL.cpp index 7039add06eba7..b7190df5f5899 100644 --- a/xbmc/windowing/egl/WinSystemEGL.cpp +++ b/xbmc/windowing/egl/WinSystemEGL.cpp @@ -56,7 +56,6 @@ CWinSystemEGL::CWinSystemEGL() : CWinSystemBase() m_egl = NULL; m_iVSyncMode = 0; - m_delayDispReset = false; } CWinSystemEGL::~CWinSystemEGL() @@ -287,18 +286,6 @@ bool CWinSystemEGL::CreateNewWindow(const std::string& name, bool fullScreen, RE return true; } - int delay = CSettings::GetInstance().GetInt("videoscreen.delayrefreshchange"); - if (delay > 0) - { - m_delayDispReset = true; - m_dispResetTimer.Set(delay * 100); - } - - { CSingleLock lock(m_resourceSection); - for (std::vector::iterator i = m_resources.begin(); i != m_resources.end(); ++i) - (*i)->OnLostDisplay(); - } - m_stereo_mode = stereo_mode; m_bFullScreen = fullScreen; // Destroy any existing window @@ -314,13 +301,10 @@ bool CWinSystemEGL::CreateNewWindow(const std::string& name, bool fullScreen, RE } Show(); - if (!m_delayDispReset) - { - CSingleLock lock(m_resourceSection); - // tell any shared resources - for (std::vector::iterator i = m_resources.begin(); i != m_resources.end(); ++i) - (*i)->OnResetDisplay(); - } + CSingleLock lock(m_resourceSection); + // tell any shared resources + for (std::vector::iterator i = m_resources.begin(); i != m_resources.end(); ++i) + (*i)->OnResetDisplay(); return true; } @@ -459,14 +443,6 @@ bool CWinSystemEGL::IsExtSupported(const char* extension) bool CWinSystemEGL::PresentRenderImpl(const CDirtyRegionList &dirty) { - if (m_delayDispReset && m_dispResetTimer.IsTimePast()) - { - m_delayDispReset = false; - CSingleLock lock(m_resourceSection); - // tell any shared resources - for (std::vector::iterator i = m_resources.begin(); i != m_resources.end(); ++i) - (*i)->OnResetDisplay(); - } m_egl->SwapBuffers(m_display, m_surface); return true; } diff --git a/xbmc/windowing/egl/WinSystemEGL.h b/xbmc/windowing/egl/WinSystemEGL.h index d9008e1f4103e..a33dedcb6832e 100644 --- a/xbmc/windowing/egl/WinSystemEGL.h +++ b/xbmc/windowing/egl/WinSystemEGL.h @@ -27,7 +27,6 @@ #include "utils/GlobalsHandling.h" #include #include "windowing/WinSystem.h" -#include "threads/SystemClock.h" class CEGLWrapper; class IDispResource; @@ -85,8 +84,6 @@ class CWinSystemEGL : public CWinSystemBase, public CRenderSystemGLES std::string m_extensions; CCriticalSection m_resourceSection; std::vector m_resources; - bool m_delayDispReset; - XbmcThreads::EndTime m_dispResetTimer; }; XBMC_GLOBAL_REF(CWinSystemEGL,g_Windowing);