Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[rbp] revert c853cb6 and added refreshrate to WinSystem base so we ca…

…n store and check it in the EGL windowing. My understanding how XBMC handles refreshrates was wrong, missed the point with the start parameter --standalone
  • Loading branch information...
commit e124c6d2fa394d9417f045a03a9d4cdc49de557d 1 parent 3dd86bd
@huceke huceke authored
View
4 xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -2276,12 +2276,12 @@ void CGUIWindowSettingsCategory::FillInResolutions(CStdString strSetting, Displa
for (unsigned int idx = 0; idx < resolutions.size(); idx++)
{
CStdString strRes;
- strRes.Format("%dx%d @%dHz", resolutions[idx].width, resolutions[idx].height, resolutions[idx].refresh);
+ strRes.Format("%dx%d", resolutions[idx].width, resolutions[idx].height);
pControl->AddLabel(strRes, resolutions[idx].ResInfo_Index);
RESOLUTION_INFO res1 = g_settings.m_ResInfo[res];
RESOLUTION_INFO res2 = g_settings.m_ResInfo[resolutions[idx].ResInfo_Index];
- if (res1.iScreen == res2.iScreen && res1.iWidth == res2.iWidth && res1.iHeight == res2.iHeight && (int)res1.fRefreshRate == (int)res2.fRefreshRate)
+ if (res1.iScreen == res2.iScreen && res1.iWidth == res2.iWidth && res1.iHeight == res2.iHeight)
spinres = (RESOLUTION) resolutions[idx].ResInfo_Index;
}
}
View
9 xbmc/windowing/WinSystem.cpp
@@ -35,6 +35,7 @@ CWinSystemBase::CWinSystemBase()
m_bFullScreen = false;
m_nScreen = 0;
m_bBlankOtherDisplay = false;
+ m_fRefreshRate = 0.0f;
}
CWinSystemBase::~CWinSystemBase()
@@ -107,21 +108,19 @@ static void AddResolution(vector<RESOLUTION_WHR> &resolutions, unsigned int addi
{
int width = g_settings.m_ResInfo[addindex].iWidth;
int height = g_settings.m_ResInfo[addindex].iHeight;
- int refresh = g_settings.m_ResInfo[addindex].fRefreshRate + 0.5;
for (unsigned int idx = 0; idx < resolutions.size(); idx++)
- if (resolutions[idx].width == width && resolutions[idx].height == height && resolutions[idx].refresh == refresh)
+ if (resolutions[idx].width == width && resolutions[idx].height == height)
return; // already taken care of.
- RESOLUTION_WHR res = {width, height, refresh, addindex};
+ RESOLUTION_WHR res = {width, height, addindex};
resolutions.push_back(res);
}
static bool resSortPredicate (RESOLUTION_WHR i, RESOLUTION_WHR j)
{
return ( i.width < j.width
- || (i.width == j.width && i.height < j.height)
- || (i.width == j.width && i.height == j.height && i.refresh < j.refresh));
+ || (i.width == j.width && i.height < j.height));
}
vector<RESOLUTION_WHR> CWinSystemBase::ScreenResolutions(int screen)
View
2  xbmc/windowing/WinSystem.h
@@ -41,7 +41,6 @@ struct RESOLUTION_WHR
{
int width;
int height;
- int refresh;
int ResInfo_Index;
};
@@ -115,6 +114,7 @@ class CWinSystemBase
bool m_bFullScreen;
int m_nScreen;
bool m_bBlankOtherDisplay;
+ float m_fRefreshRate;
};
View
3  xbmc/windowing/egl/WinSystemGLES.cpp
@@ -77,7 +77,7 @@ bool CWinSystemGLES::DestroyWindowSystem()
bool CWinSystemGLES::CreateNewWindow(const CStdString& name, bool fullScreen, RESOLUTION_INFO& res, PHANDLE_EVENT_FUNC userFunction)
{
- if (m_bWindowCreated && m_nWidth == res.iWidth && m_nHeight == res.iHeight && m_bFullScreen == fullScreen)
+ if (m_bWindowCreated && m_nWidth == res.iWidth && m_nHeight == res.iHeight && m_fRefreshRate == res.fRefreshRate && m_bFullScreen == fullScreen)
{
CLog::Log(LOGDEBUG, "CWinSystemGLES::CreateNewWindow: No need to create a new window");
return true;
@@ -86,6 +86,7 @@ bool CWinSystemGLES::CreateNewWindow(const CStdString& name, bool fullScreen, RE
m_nWidth = res.iWidth;
m_nHeight = res.iHeight;
m_bFullScreen = fullScreen;
+ m_fRefreshRate = res.fRefreshRate;
// Destroy any existing window
if (m_bWindowCreated)
Please sign in to comment.
Something went wrong with that request. Please try again.