|
|
@@ -860,7 +860,12 @@ create_screen_buffers_and_device(DXScreenData &Display, bool force_16bpp_zbuffer
|
|
|
dwBehaviorFlags, pPresParams, &Display.pD3DDevice);
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
- wdxdisplay8_cat.fatal() << "D3D CreateDevice failed for device #" << Display.CardIDNum << D3DERRORSTRING(hr);
|
|
|
+ wdxdisplay8_cat.warning() << "pPresParams->BackBufferWidth : " << pPresParams->BackBufferWidth << endl;
|
|
|
+ wdxdisplay8_cat.warning() << "pPresParams->BackBufferHeight : " << pPresParams->BackBufferHeight << endl;
|
|
|
+ wdxdisplay8_cat.warning() << "pPresParams->BackBufferFormat : " << pPresParams->BackBufferFormat << endl;
|
|
|
+ wdxdisplay8_cat.warning() << "pPresParams->BackBufferCount : " << pPresParams->BackBufferCount << endl;
|
|
|
+ wdxdisplay8_cat.warning() << "D3D CreateDevice failed for device #" << Display.CardIDNum << D3DERRORSTRING(hr);
|
|
|
+ goto Fallback_to_16bpp_buffers;
|
|
|
//exit(1);
|
|
|
return false;
|
|
|
}
|
|
|
@@ -895,7 +900,7 @@ create_screen_buffers_and_device(DXScreenData &Display, bool force_16bpp_zbuffer
|
|
|
|
|
|
if (wdxdisplay8_cat.info()) {
|
|
|
wdxdisplay8_cat.info()
|
|
|
- << "CreateDevice failed with out-of-vidmem, retrying w/16bpp buffers on device #"
|
|
|
+ << "CreateDevice failed with out-of-vidmem or invalid BackBufferFormat, retrying w/16bpp buffers on device #"
|
|
|
<< Display.CardIDNum << endl;
|
|
|
}
|
|
|
return create_screen_buffers_and_device(Display, true);
|
|
|
@@ -1788,6 +1793,11 @@ open_window(void) {
|
|
|
while(1) {
|
|
|
if (dxgsg->get_pipe()->get_device() == NULL || discard_device) {
|
|
|
wdxdisplay8_cat.debug() << "device is null or fullscreen\n";
|
|
|
+
|
|
|
+ // If device exists, free it
|
|
|
+ if (dxgsg->get_pipe()->get_device()) {
|
|
|
+ dxgsg->dx_cleanup(false, true);
|
|
|
+ }
|
|
|
|
|
|
wdxdisplay8_cat.debug()<<"device width "<<_wcontext.DisplayMode.Width<<"\n";
|
|
|
if (!create_screen_buffers_and_device(_wcontext, dx_force_16bpp_zbuffer)) {
|