]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Another missing DXGI 1.4/1.5 test.
authorToni Wilen <twilen@winuae.net>
Mon, 5 Feb 2018 20:21:52 +0000 (22:21 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 5 Feb 2018 20:21:52 +0000 (22:21 +0200)
od-win32/direct3d11.cpp

index 4aadfb9374bb0728769d4b2eddb934bb5ebe56cd..49af8d1451193fbc39d4414cb1b14ee000fed0d0 100644 (file)
@@ -3086,11 +3086,15 @@ static int xxD3D11_init2(HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int dep
        } else {
                BOOL allowTearing = FALSE;
                result = factory4.As(&factory5);
-               factory2 = factory5;
-               if (!d3d->m_tearingSupport) {
-                       result = factory5->CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING, &allowTearing, sizeof(allowTearing));
-                       d3d->m_tearingSupport = SUCCEEDED(result) && allowTearing;
-                       write_log(_T("CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING) = %08x %d\n"), result, allowTearing);
+               if (SUCCEEDED(result)) {
+                       factory2 = factory5;
+                       if (!d3d->m_tearingSupport) {
+                               result = factory5->CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING, &allowTearing, sizeof(allowTearing));
+                               d3d->m_tearingSupport = SUCCEEDED(result) && allowTearing;
+                               write_log(_T("CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING) = %08x %d\n"), result, allowTearing);
+                       }
+               } else {
+                       factory2 = factory4;
                }
        }