Skip to content

Commit

Permalink
d3d9: Enable 9ex, but not slower flip.
Browse files Browse the repository at this point in the history
But maybe it's not slower?  Needs more testing.
  • Loading branch information
unknownbrackets committed Sep 21, 2014
1 parent 6618681 commit ae87024
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Windows/D3D9Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ae87024

Please sign in to comment.