Skip to content

Commit

Permalink
fix switching refresh rates
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Mar 13, 2014
1 parent b3391ee commit 343f4af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/windowing/WinSystem.cpp
Expand Up @@ -129,16 +129,16 @@ static void AddResolution(vector<RESOLUTION_WHR> &resolutions, unsigned int addi
int flags = resInfo.dwFlags & D3DPRESENTFLAG_MODEMASK;
float refreshrate = resInfo.fRefreshRate;

for (unsigned int idx = 0; idx < resolutions.size(); idx++)
// don't touch RES_DESKTOP
for (unsigned int idx = 1; idx < resolutions.size(); idx++)
if ( resolutions[idx].width == width
&& resolutions[idx].height == height
&&(resolutions[idx].flags & D3DPRESENTFLAG_MODEMASK) == flags)
{
// check if the refresh rate of this resolution is better suited than
// the refresh rate of the resolution with the same width/height/interlaced
// property and if so replace it
// don't touch RES_DESKTOP
if (idx != 0 && bestRefreshrate > 0.0 && refreshrate == bestRefreshrate)
if (bestRefreshrate > 0.0 && refreshrate == bestRefreshrate)
resolutions[idx].ResInfo_Index = addindex;

// no need to add the resolution again
Expand Down

0 comments on commit 343f4af

Please sign in to comment.