David Rose преди 18 години
родител
ревизия
26ac51dca9
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 2 1
      panda/src/dxgsg8/wdxGraphicsWindow8.cxx
  2. 2 1
      panda/src/dxgsg9/wdxGraphicsWindow9.cxx

+ 2 - 1
panda/src/dxgsg8/wdxGraphicsWindow8.cxx

@@ -275,7 +275,8 @@ open_window() {
   // can't open multiple different windows with the same GSG, but you
   // can't open multiple different windows with the same GSG, but you
   // may have more luck opening different windows with different
   // may have more luck opening different windows with different
   // GSG's.
   // GSG's.
-  bool discard_device = ConfigVariableBool("always-discard-device", true);
+  static ConfigVariableBool always_discard_device("always-discard-device", true);
+  bool discard_device = always_discard_device;
 
 
   // GSG creation/initialization.
   // GSG creation/initialization.
   if (_gsg == 0) {
   if (_gsg == 0) {

+ 2 - 1
panda/src/dxgsg9/wdxGraphicsWindow9.cxx

@@ -280,7 +280,8 @@ open_window() {
   // can't open multiple different windows with the same GSG, but you
   // can't open multiple different windows with the same GSG, but you
   // may have more luck opening different windows with different
   // may have more luck opening different windows with different
   // GSG's.
   // GSG's.
-  bool discard_device = ConfigVariableBool("always-discard-device", true);
+  static ConfigVariableBool always_discard_device("always-discard-device", true);
+  bool discard_device = always_discard_device;
 
 
   if (_gsg == 0) {
   if (_gsg == 0) {
     _dxgsg = new DXGraphicsStateGuardian9(_pipe);
     _dxgsg = new DXGraphicsStateGuardian9(_pipe);