From ae87024a0dc178f640bbfccb06a69ea4ba64b102 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 21 Sep 2014 12:35:33 -0700 Subject: [PATCH] d3d9: Enable 9ex, but not slower flip. But maybe it's not slower? Needs more testing. --- Windows/D3D9Base.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Windows/D3D9Base.cpp b/Windows/D3D9Base.cpp index 899efe7409..069f643f9d 100644 --- a/Windows/D3D9Base.cpp +++ b/Windows/D3D9Base.cpp @@ -68,8 +68,6 @@ bool D3D9_Init(HWND hWnd, bool windowed, std::string *error_message) { g_pfnCreate9ex = (DIRECT3DCREATE9EX)GetProcAddress(hD3D9, "Direct3DCreate9Ex"); has9Ex = (g_pfnCreate9ex != NULL); - has9Ex = false; - if (has9Ex) { HRESULT result = g_pfnCreate9ex(D3D_SDK_VERSION, &d3dEx); d3d = d3dEx; @@ -143,8 +141,9 @@ bool D3D9_Init(HWND hWnd, bool windowed, std::string *error_message) { if (has9Ex) { if (windowed && IsWin7OrLater()) { // This new flip mode gives higher performance. - pp.BackBufferCount = 2; - pp.SwapEffect = D3DSWAPEFFECT_FLIPEX; + // TODO: This makes it slower? + //pp.BackBufferCount = 2; + //pp.SwapEffect = D3DSWAPEFFECT_FLIPEX; } hr = d3dEx->CreateDeviceEx(adapterId, D3DDEVTYPE_HAL, hWnd, dwBehaviorFlags, &pp, NULL, &deviceEx); device = deviceEx; @@ -172,7 +171,8 @@ bool D3D9_Init(HWND hWnd, bool windowed, std::string *error_message) { DX9::fbo_init(d3d); if (deviceEx && IsWin7OrLater()) { - deviceEx->SetMaximumFrameLatency(1); + // TODO: This makes it slower? + //deviceEx->SetMaximumFrameLatency(1); } return true;