diff --git a/bootstrap b/bootstrap index 9b2c2f6..09a001d 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #!/bin/sh autoreconf -vif -autoreconf -vif xbmc/lib/libass +#autoreconf -vif xbmc/lib/libass echo "Please (re)run configure..." diff --git a/configure.in b/configure.in index b7d4e7e..914e5bb 100644 --- a/configure.in +++ b/configure.in @@ -817,7 +817,6 @@ fi if test "$use_xrandr" = "yes"; then final_message="$final_message\n XRandR:\tYes" - SDL_DEFINES="$SDL_DEFINES -DHAS_XRANDR" else final_message="$final_message\n XRandR:\tNo" fi diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 9fe8113..7d5c282 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -224,7 +224,7 @@ #include #include "win32util.h" #endif -#ifdef HAS_XRANDR +#ifdef HAVE_LIBXRANDR #include "XRandR.h" #endif #ifdef __APPLE__ @@ -257,6 +257,10 @@ #include "common/IRServerSuite/IRServerSuite.h" #endif +#if defined(HAVE_CONFIG_H) && !defined(_WIN32) +#include "config.h" +#endif + using namespace std; using namespace XFILE; using namespace DIRECTORY; @@ -549,7 +553,7 @@ HRESULT CApplication::Create(HWND hWnd) g_stSettings.m_logFolder = "special://masterprofile/"; } -#ifdef HAS_XRANDR +#ifdef HAVE_LIBXRANDR g_xrandr.LoadCustomModeLinesToAllOutputs(); #endif diff --git a/xbmc/Settings.cpp b/xbmc/Settings.cpp index c0b40a5..9c69983 100644 --- a/xbmc/Settings.cpp +++ b/xbmc/Settings.cpp @@ -57,6 +57,10 @@ #endif #include "playercorefactory/PlayerCoreFactory.h" +#if defined(HAVE_CONFIG_H) && !defined(_WIN32) +#include "config.h" +#endif + using namespace std; using namespace XFILE; using namespace DIRECTORY; @@ -624,7 +628,7 @@ bool CSettings::LoadCalibration(const TiXmlElement* pRoot, const CStdString& str /* Hmm, these stuff shouldn't be releaded, they should be used instead of our internal id counter to select what resolution is affected by this settings -#ifdef HAS_XRANDR +#ifdef HAVE_LIBXRANDR const CStdString def(""); CStdString val; GetString(pResolution, "xrandrid", val, def); @@ -653,7 +657,7 @@ bool CSettings::SaveCalibration(TiXmlNode* pRootNode) const XMLUtils::SetString(pNode, "description", m_ResInfo[i].strMode); XMLUtils::SetInt(pNode, "subtitles", m_ResInfo[i].iSubtitles); XMLUtils::SetFloat(pNode, "pixelratio", m_ResInfo[i].fPixelRatio); -#ifdef HAS_XRANDR +#ifdef HAVE_LIBXRANDR XMLUtils::SetFloat(pNode, "refreshrate", m_ResInfo[i].fRefreshRate); XMLUtils::SetString(pNode, "output", m_ResInfo[i].strOutput); XMLUtils::SetString(pNode, "xrandrid", m_ResInfo[i].strId); diff --git a/xbmc/VideoReferenceClock.cpp b/xbmc/VideoReferenceClock.cpp index b70866b..b186b93 100644 --- a/xbmc/VideoReferenceClock.cpp +++ b/xbmc/VideoReferenceClock.cpp @@ -28,7 +28,7 @@ #include "utils/log.h" #include "utils/TimeUtils.h" -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) #include #define NVSETTINGSCMD "nvidia-settings -nt -q RefreshRate 2>&1" #elif defined(__APPLE__) @@ -72,7 +72,7 @@ void CVideoReferenceClock::Process() while(!m_bStop) { //set up the vblank clock -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) SetupSuccess = SetupGLX(); #elif defined(_WIN32) SetupSuccess = SetupD3D(); @@ -98,7 +98,7 @@ void CVideoReferenceClock::Process() SingleLock.Leave(); //run the clock -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) RunGLX(); #elif defined(_WIN32) RunD3D(); @@ -121,7 +121,7 @@ void CVideoReferenceClock::Process() SingleLock.Leave(); //clean up the vblank clock -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) CleanupGLX(); #elif defined(_WIN32) CleanupD3D(); @@ -144,7 +144,7 @@ bool CVideoReferenceClock::WaitStarted(int MSecs) return m_Started.WaitMSec(MSecs); } -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) bool CVideoReferenceClock::SetupGLX() { int singleBufferAttributes[] = { @@ -242,6 +242,7 @@ bool CVideoReferenceClock::SetupGLX() return false; } +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) XRRSizes(m_Dpy, m_vInfo->screen, &ReturnV); if (ReturnV == 0) { @@ -252,7 +253,7 @@ bool CVideoReferenceClock::SetupGLX() //set up receiving of RandR events, we'll get one when the refreshrate changes XRRQueryExtension(m_Dpy, &m_RREventBase, &ReturnV); XRRSelectInput(m_Dpy, RootWindow(m_Dpy, m_vInfo->screen), RRScreenChangeNotifyMask); - +#endif UpdateRefreshrate(true); //forced refreshrate update m_MissedVblanks = 0; @@ -305,6 +306,7 @@ bool CVideoReferenceClock::ParseNvSettings(int& RefreshRate) return true; } +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) int CVideoReferenceClock::GetRandRRate() { int RefreshRate; @@ -316,6 +318,7 @@ int CVideoReferenceClock::GetRandRRate() return RefreshRate; } +#endif void CVideoReferenceClock::CleanupGLX() { @@ -994,7 +997,7 @@ bool CVideoReferenceClock::UpdateRefreshrate(bool Forced /*= false*/) else m_LastRefreshTime = m_CurrTime; -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) bool GotEvent = Forced; XEvent Event; diff --git a/xbmc/VideoReferenceClock.h b/xbmc/VideoReferenceClock.h index c0cf259..e8e9b5e 100644 --- a/xbmc/VideoReferenceClock.h +++ b/xbmc/VideoReferenceClock.h @@ -20,11 +20,11 @@ * */ -#include "system.h" // for HAS_XRANDR, and Win32 types +#include "system.h" // for HAVE_LIBXRANDR, and Win32 types #include "Thread.h" #include "utils/CriticalSection.h" -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) #include #include #include @@ -32,6 +32,10 @@ #include #endif +#if defined(HAVE_CONFIG_H) && !defined(_WIN32) +#include "config.h" +#endif + class CVideoReferenceClock : public CThread { public: @@ -77,7 +81,7 @@ class CVideoReferenceClock : public CThread CCriticalSection m_CritSection; -#if defined(HAS_GLX) && defined(HAS_XRANDR) +#if defined(HAS_GLX) && defined(HAVE_LIBXRANDR) bool SetupGLX(); void RunGLX(); void CleanupGLX(); diff --git a/xbmc/WinSystemX11.cpp b/xbmc/WinSystemX11.cpp index e69b3f7..b2d9a95 100644 --- a/xbmc/WinSystemX11.cpp +++ b/xbmc/WinSystemX11.cpp @@ -23,6 +23,10 @@ #ifdef HAS_GLX +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + #include #include "WinSystemX11.h" #include "SpecialProtocol.h" @@ -148,7 +152,7 @@ bool CWinSystemX11::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl m_nHeight = res.iHeight; m_bFullScreen = fullScreen; -#if defined(HAS_XRANDR) +#if defined(HAVE_LIBXRANDR) if(m_bFullScreen) { @@ -186,7 +190,7 @@ void CWinSystemX11::UpdateResolutions() CWinSystemBase::UpdateResolutions(); -#if defined(HAS_XRANDR) +#if defined(HAVE_LIBXRANDR) { XOutput out = g_xrandr.GetCurrentOutput(); XMode mode = g_xrandr.GetCurrentMode(out.name); @@ -204,7 +208,7 @@ void CWinSystemX11::UpdateResolutions() #endif -#if defined(HAS_XRANDR) +#if defined(HAVE_LIBXRANDR) CLog::Log(LOGINFO, "Available videomodes (xrandr):"); vector::iterator outiter; diff --git a/xbmc/linux/XRandR.cpp b/xbmc/linux/XRandR.cpp index 118b327..f050a0b 100644 --- a/xbmc/linux/XRandR.cpp +++ b/xbmc/linux/XRandR.cpp @@ -19,7 +19,7 @@ * */ -#ifdef HAS_XRANDR +#ifdef HAVE_LIBXRANDR #include #include "system.h" @@ -333,7 +333,7 @@ void CXRandR::LoadCustomModeLinesToAllOutputs(void) CXRandR g_xrandr; -#endif // HAS_XRANDR +#endif // HAVE_LIBXRANDR /* int main() diff --git a/xbmc/linux/XRandR.h b/xbmc/linux/XRandR.h index 9b000d1..4f08bb6 100644 --- a/xbmc/linux/XRandR.h +++ b/xbmc/linux/XRandR.h @@ -22,7 +22,11 @@ * */ -#ifdef HAS_XRANDR +#if defined(HAVE_CONFIG_H) && !defined(_WIN32) +#include "config.h" +#endif + +#ifdef HAVE_LIBXRANDR #include "StdString.h" #include