for ( modeNum = 0 ; ; modeNum++ ) {
if ( !EnumDisplaySettings( NULL, modeNum, &devmode ) ) {
if ( matched ) {
// we got a resolution match, but not a frequency match
// so disable the frequency requirement
common->Printf( "..." S_COLOR_YELLOW "%dhz is unsupported at %dx%d\n" S_COLOR_DEFAULT, parms.displayHz, parms.width, parms.height );
parms.displayHz = 0;
break;
}
common->Printf( "..." S_COLOR_YELLOW "%dx%d is unsupported in 32 bit\n" S_COLOR_DEFAULT, parms.width, parms.height );
return false;
}
if ( (int)devmode.dmPelsWidth >= parms.width
&& (int)devmode.dmPelsHeight >= parms.height
&& (int)devmode.dmBitsPerPel == 32 ) {
matched = true;
if ( parms.displayHz == 0 || devmode.dmDisplayFrequency == parms.displayHz ) {
break;
}
}