David Rose %!s(int64=18) %!d(string=hai) anos
pai
achega
26ac51dca9

+ 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
   // may have more luck opening different windows with different
   // 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.
   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
   // may have more luck opening different windows with different
   // 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) {
     _dxgsg = new DXGraphicsStateGuardian9(_pipe);