diff --git a/panda/src/wdxdisplay/config_wdxdisplay.cxx b/panda/src/wdxdisplay/config_wdxdisplay.cxx index 7f6f47384b..e128afb7e0 100644 --- a/panda/src/wdxdisplay/config_wdxdisplay.cxx +++ b/panda/src/wdxdisplay/config_wdxdisplay.cxx @@ -33,6 +33,9 @@ bool dx_force_16bpp_zbuffer = config_wdxdisplay.GetBool("dx-force-16bpp-zbuffer" bool bResponsive_minimized_fullscreen_window = config_wdxdisplay.GetBool("responsive-minimized-fullscreen-window",false); bool dx_preserve_fpu_state = config_wdxdisplay.GetBool("dx-preserve-fpu-state", false); +// if true, use ddraw's GetAvailVidMem to fail if driver says it has too little video mem +bool dx_do_vidmemsize_check = config_wdxdisplay.GetBool("do-vidmemsize-check", true); + // For now, set this true to use the IME correctly on Win2000, or // false on Win98. This is temporary; once we have been able to // verify that this distinction is actually necessary, we can replace diff --git a/panda/src/wdxdisplay/config_wdxdisplay.h b/panda/src/wdxdisplay/config_wdxdisplay.h index 6318005a4c..373d13e7be 100644 --- a/panda/src/wdxdisplay/config_wdxdisplay.h +++ b/panda/src/wdxdisplay/config_wdxdisplay.h @@ -28,6 +28,7 @@ NotifyCategoryDecl(wdxdisplay, EXPCL_PANDADX, EXPTP_PANDADX); extern bool bResponsive_minimized_fullscreen_window; extern bool dx_force_16bpp_zbuffer; extern bool dx_preserve_fpu_state; +extern bool dx_do_vidmemsize_check; extern Filename get_icon_filename(); extern Filename get_mono_cursor_filename(); extern Filename get_color_cursor_filename(); diff --git a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx index 7890e225b6..ef94c5c525 100644 --- a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx +++ b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx @@ -1756,6 +1756,11 @@ bool wdxGraphicsWindow::search_for_device(int devnum,DXDeviceInfo *pDevinfo) { // assume buggy drivers (this means you, FireGL2) may return zero for dwVidMemTotal, so ignore value if its < CRAPPY_DRIVER_IS_LYING_VIDMEMTHRESHOLD _dxgsg->scrn.bIsLowVidMemCard = ((dwVidMemTotal>CRAPPY_DRIVER_IS_LYING_VIDMEMTHRESHOLD) && (dwVidMemTotal< LOWVIDMEMTHRESHOLD)); + if(!dx_do_vidmemsize_check) { + _dxgsg->scrn.MaxAvailVidMem = 0xFFFFFFFF; + _dxgsg->scrn.bIsLowVidMemCard = false; + } + if(DeviceIdx==SWRASTIDX) { // this will force 640x480x16, is this what we want for all sw rast? _dxgsg->scrn.bIsLowVidMemCard = true;