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