From 4efff2aded843b010af19f57038b74cfe35dd850 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Wed, 9 Oct 2002 00:07:03 +0000 Subject: [PATCH] oops --- panda/src/wdxdisplay/wdxGraphicsWindow.cxx | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx index 094fbb08bc..f343100382 100644 --- a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx +++ b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx @@ -1601,28 +1601,29 @@ verify_window_sizes(unsigned int numsizes,unsigned int *dimen) { bool bIsGoodMode=false; - if(special_check_fullscreen_resolution(xsize,ysize)) { - // bypass the test below for certain cards we know have valid modes - bIsGoodMode=true; - } else { - if(_dxgsg->scrn.bIsLowVidMemCard) - bIsGoodMode=(((float)xsize*(float)ysize)<=(float)(640*480)); - else if(DMI.supportedBitDepths & (DDBD_16 | DDBD_24 | DDBD_32)) { - // assume user is testing fullscreen, not windowed, so use the dwTotal value - // 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 - - #define REQD_TEXMEM 1800000.0f - - if(_dxgsg->scrn.MaxAvailVidMem==0) { - //assume buggy drivers return bad val of 0 and everything will be OK - bIsGoodMode=true; - } else { - bIsGoodMode = ((((float)xsize*(float)ysize)*6+REQD_TEXMEM) < (float)_dxgsg->scrn.MaxAvailVidMem); - } + if(DMI.supportedBitDepths & (DDBD_16 | DDBD_24 | DDBD_32)) { + if(special_check_fullscreen_resolution(xsize,ysize)) { + // bypass the test below for certain cards we know have valid modes + bIsGoodMode=true; + } else { + if(_dxgsg->scrn.bIsLowVidMemCard) + bIsGoodMode=(((float)xsize*(float)ysize)<=(float)(640*480)); + else { + // assume user is testing fullscreen, not windowed, so use the dwTotal value + // 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 + + #define REQD_TEXMEM 1800000.0f + + if(_dxgsg->scrn.MaxAvailVidMem==0) { + //assume buggy drivers return bad val of 0 and everything will be OK + bIsGoodMode=true; + } else { + bIsGoodMode = ((((float)xsize*(float)ysize)*6+REQD_TEXMEM) < (float)_dxgsg->scrn.MaxAvailVidMem); + } } }