d3d9: Enable 9ex, but not slower flip.

But maybe it's not slower?  Needs more testing.
This commit is contained in:
Unknown W. Brackets 2014-09-21 12:35:33 -07:00
parent 6618681d05
commit ae87024a0d

View file

@ -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;