prevent crash after failure to open; minor correction to output

This commit is contained in:
David Rose 2004-02-06 19:55:09 +00:00
parent c48a1625a3
commit 673a29c71b
4 changed files with 5 additions and 4 deletions

View File

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

View File

@ -977,8 +977,8 @@ choose_device(void) {
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;
}
@ -1722,7 +1722,6 @@ reset_window(bool swapchain) {
////////////////////////////////////////////////////////////////////
bool wdxGraphicsWindow8::
open_window(void) {
cerr << "open_window()\n";
PT(DXGraphicsDevice8) dxdev;
DXGraphicsStateGuardian8 *dxgsg;
DCAST_INTO_R(dxgsg,_gsg,false);

View File

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

View File

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