This commit is contained in:
cxgeorge 2002-10-09 00:07:03 +00:00
parent 273697401b
commit 4efff2aded

View File

@ -1601,28 +1601,29 @@ verify_window_sizes(unsigned int numsizes,unsigned int *dimen) {
bool bIsGoodMode=false; bool bIsGoodMode=false;
if(special_check_fullscreen_resolution(xsize,ysize)) { if(DMI.supportedBitDepths & (DDBD_16 | DDBD_24 | DDBD_32)) {
// bypass the test below for certain cards we know have valid modes if(special_check_fullscreen_resolution(xsize,ysize)) {
bIsGoodMode=true; // bypass the test below for certain cards we know have valid modes
} else { bIsGoodMode=true;
if(_dxgsg->scrn.bIsLowVidMemCard) } else {
bIsGoodMode=(((float)xsize*(float)ysize)<=(float)(640*480)); if(_dxgsg->scrn.bIsLowVidMemCard)
else if(DMI.supportedBitDepths & (DDBD_16 | DDBD_24 | DDBD_32)) { bIsGoodMode=(((float)xsize*(float)ysize)<=(float)(640*480));
// assume user is testing fullscreen, not windowed, so use the dwTotal value else {
// see if 3 scrnbufs (front/back/z)at 16bpp at xsize*ysize will fit with a few // assume user is testing fullscreen, not windowed, so use the dwTotal value
// extra megs for texmem // see if 3 scrnbufs (front/back/z)at 16bpp at xsize*ysize will fit with a few
// extra megs for texmem
// 8MB Rage Pro says it has 6.8 megs Total free and will run at 1024x768, so
// formula makes it so that is OK // 8MB Rage Pro says it has 6.8 megs Total free and will run at 1024x768, so
// formula makes it so that is OK
#define REQD_TEXMEM 1800000.0f
#define REQD_TEXMEM 1800000.0f
if(_dxgsg->scrn.MaxAvailVidMem==0) {
//assume buggy drivers return bad val of 0 and everything will be OK if(_dxgsg->scrn.MaxAvailVidMem==0) {
bIsGoodMode=true; //assume buggy drivers return bad val of 0 and everything will be OK
} else { bIsGoodMode=true;
bIsGoodMode = ((((float)xsize*(float)ysize)*6+REQD_TEXMEM) < (float)_dxgsg->scrn.MaxAvailVidMem); } else {
} bIsGoodMode = ((((float)xsize*(float)ysize)*6+REQD_TEXMEM) < (float)_dxgsg->scrn.MaxAvailVidMem);
}
} }
} }