Browse Source

make configrc var for vidmemsize chk

cxgeorge 24 years ago
parent
commit
db8619b534

+ 3 - 0
panda/src/wgldisplay/config_wgldisplay.cxx

@@ -47,6 +47,9 @@ bool bResponsive_minimized_fullscreen_window = config_wgldisplay.GetBool("respon
 // will crab out WireGL.
 bool support_wiregl = config_wgldisplay.GetBool("support-wiregl", false);
 
+// if true, use ddraw's GetAvailVidMem to fail if driver says it has too little video mem
+bool gl_do_vidmemsize_check = config_wgldisplay.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

+ 1 - 0
panda/src/wgldisplay/config_wgldisplay.h

@@ -36,6 +36,7 @@ extern float gl_fps_meter_update_interval;
 extern bool gl_sync_video;
 extern int gl_forced_pixfmt;
 extern bool bResponsive_minimized_fullscreen_window;
+extern bool gl_do_vidmemsize_check;
 extern bool support_wiregl;
 extern bool ime_composition_w;
 extern bool wgl_force_sw_renderer;

+ 2 - 2
panda/src/wgldisplay/wglGraphicsWindow.cxx

@@ -432,10 +432,10 @@ void wglGraphicsWindow::config() {
       DWORD dwFullScreenBitDepth=cur_bitdepth;
 
       #define LOWVIDMEMTHRESHOLD 3500000
-      if (GetAvailVidMem() < LOWVIDMEMTHRESHOLD) {
+      if (gl_do_vidmemsize_check && (GetAvailVidMem() < LOWVIDMEMTHRESHOLD)) {
           _bIsLowVidMemCard = true;
           wgldisplay_cat.debug() << "small video memory card detect, switching fullscreen to minimum 640x480x16 config\n";
-          // we're going to need  640x480 at 16 bit to save enough tex vidmem
+          // we're going to need 640x480 at 16 bit to save enough tex vidmem
           dwFullScreenBitDepth=16;
           dwWidth=640;
           dwHeight=480;