浏览代码

Add DirextX/driver managment options.

aignacio_sf 19 年之前
父节点
当前提交
deb3f12f1b
共有 3 个文件被更改,包括 17 次插入0 次删除
  1. 8 0
      panda/src/dxgsg9/config_dxgsg9.cxx
  2. 2 0
      panda/src/dxgsg9/config_dxgsg9.h
  3. 7 0
      panda/src/dxgsg9/wdxGraphicsWindow9.cxx

+ 8 - 0
panda/src/dxgsg9/config_dxgsg9.cxx

@@ -188,6 +188,14 @@ ConfigVariableBool dx_use_multithread
 ConfigVariableBool dx_use_puredevice
 ConfigVariableBool dx_use_puredevice
 ("dx-use-puredevice", false);
 ("dx-use-puredevice", false);
 
 
+// DX device option
+ConfigVariableBool dx_disable_driver_management
+("dx-disable-driver-management", false);
+
+// DX device option
+ConfigVariableBool dx_disable_driver_management_ex
+("dx-disable-driver-management-ex", false);
+
 // nVidia's performace heads up display
 // nVidia's performace heads up display
 ConfigVariableBool dx_use_nvperfhud
 ConfigVariableBool dx_use_nvperfhud
 ("dx-use-nvperfhud", false);
 ("dx-use-nvperfhud", false);

+ 2 - 0
panda/src/dxgsg9/config_dxgsg9.h

@@ -78,6 +78,8 @@ extern ConfigVariableBool dx_use_dynamic_textures;
 // DX device options
 // DX device options
 extern ConfigVariableBool dx_use_multithread;
 extern ConfigVariableBool dx_use_multithread;
 extern ConfigVariableBool dx_use_puredevice;
 extern ConfigVariableBool dx_use_puredevice;
+extern ConfigVariableBool dx_disable_driver_management;
+extern ConfigVariableBool dx_disable_driver_management_ex;
 
 
 // nVidia's performace heads up display
 // nVidia's performace heads up display
 extern ConfigVariableBool dx_use_nvperfhud;
 extern ConfigVariableBool dx_use_nvperfhud;

+ 7 - 0
panda/src/dxgsg9/wdxGraphicsWindow9.cxx

@@ -688,6 +688,13 @@ create_screen_buffers_and_device(DXScreenData &display, bool force_16bpp_zbuffer
     dwBehaviorFlags |= D3DCREATE_PUREDEVICE;
     dwBehaviorFlags |= D3DCREATE_PUREDEVICE;
   }
   }
 
 
+  if (dx_disable_driver_management) {
+    dwBehaviorFlags |= D3DCREATE_DISABLE_DRIVER_MANAGEMENT;
+  }
+  if (dx_disable_driver_management_ex) {
+    dwBehaviorFlags |= D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX;
+  }
+  
   if (is_fullscreen()) {
   if (is_fullscreen()) {
     // CREATE FULLSCREEN BUFFERS
     // CREATE FULLSCREEN BUFFERS