Permalink
Browse files

Merge pull request #4410 from FernetMenta/res

fix switching refresh rates
  • Loading branch information...
2 parents 20db8f3 + 343f4af commit 565a788aa55503d740444ffb207920697839f7ca @jmarshallnz jmarshallnz committed Mar 13, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 xbmc/windowing/WinSystem.cpp
@@ -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

0 comments on commit 565a788

Please sign in to comment.