2
0
Эх сурвалжийг харах

prevent crash after failure to open; minor correction to output

David Rose 22 жил өмнө
parent
commit
673a29c71b

+ 1 - 0
panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

@@ -406,6 +406,7 @@ DXGraphicsStateGuardian8(const FrameBufferProperties &properties) :
     reset_panda_gsg();
     reset_panda_gsg();
 
 
     _pScrn = NULL;
     _pScrn = NULL;
+    _pD3DDevice = NULL;
     
     
     _bDXisReady = false;
     _bDXisReady = false;
     _overlay_windows_supported = false;
     _overlay_windows_supported = false;

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

@@ -977,8 +977,8 @@ choose_device(void) {
           good_device_count++;
           good_device_count++;
   }
   }
 
 
-  if(good_device_count==0) {
-     wdxdisplay8_cat.fatal() << "no usable display devices, exiting...\n";
+  if (good_device_count==0) {
+     wdxdisplay8_cat.error() << "no usable display devices.\n";
      return false;
      return false;
   }
   }
 
 
@@ -1722,7 +1722,6 @@ reset_window(bool swapchain) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool wdxGraphicsWindow8::
 bool wdxGraphicsWindow8::
 open_window(void) {
 open_window(void) {
-  cerr << "open_window()\n";
   PT(DXGraphicsDevice8) dxdev;
   PT(DXGraphicsDevice8) dxdev;
   DXGraphicsStateGuardian8 *dxgsg;
   DXGraphicsStateGuardian8 *dxgsg;
   DCAST_INTO_R(dxgsg,_gsg,false);
   DCAST_INTO_R(dxgsg,_gsg,false);

+ 1 - 0
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

@@ -406,6 +406,7 @@ DXGraphicsStateGuardian9(const FrameBufferProperties &properties) :
     reset_panda_gsg();
     reset_panda_gsg();
 
 
     _pScrn = NULL;
     _pScrn = NULL;
+    _pD3DDevice = NULL;
     
     
     _bDXisReady = false;
     _bDXisReady = false;
     _overlay_windows_supported = false;
     _overlay_windows_supported = false;

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

@@ -980,7 +980,7 @@ choose_device(void) {
   }
   }
 
 
   if(good_device_count==0) {
   if(good_device_count==0) {
-     wdxdisplay9_cat.fatal() << "no usable display devices, exiting...\n";
+     wdxdisplay9_cat.error() << "no usable display devices.\n";
      return false;
      return false;
   }
   }