diff --git a/src/client/component/iidx/d3d9_proxy/device_ex.cpp b/src/client/component/iidx/d3d9_proxy/device_ex.cpp index ba0afa5..a088264 100644 --- a/src/client/component/iidx/d3d9_proxy/device_ex.cpp +++ b/src/client/component/iidx/d3d9_proxy/device_ex.cpp @@ -105,7 +105,7 @@ HRESULT __stdcall d3d9ex_device_proxy::Reset(D3DPRESENT_PARAMETERS* pPresentatio HRESULT __stdcall d3d9ex_device_proxy::Present(const RECT* pSourceRect, const RECT* pDestRect, HWND hDestWindowOverride, const RGNDATA* pDirtyRegion) { - return device_->Present(pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); + return device_->PresentEx(pSourceRect, pDestRect, NULL, NULL, D3DPRESENT_FORCEIMMEDIATE); } HRESULT __stdcall d3d9ex_device_proxy::GetBackBuffer(UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) diff --git a/src/client/component/iidx/d3d9_proxy/interface_ex.cpp b/src/client/component/iidx/d3d9_proxy/interface_ex.cpp index e1163df..63a7309 100644 --- a/src/client/component/iidx/d3d9_proxy/interface_ex.cpp +++ b/src/client/component/iidx/d3d9_proxy/interface_ex.cpp @@ -189,6 +189,10 @@ HRESULT __stdcall d3d9ex_proxy::CreateDeviceEx(UINT Adapter, D3DDEVTYPE DeviceTy pPresentationParameters->BackBufferWidth = iidx::custom_resolution::width(); pPresentationParameters->BackBufferHeight = iidx::custom_resolution::height(); + pPresentationParameters->BackBufferCount = 2; + pPresentationParameters->PresentationInterval = 0; + pPresentationParameters->SwapEffect = D3DSWAPEFFECT_FLIPEX; + if (iidx::custom_resolution::mode() != 0) { diff --git a/src/client/main.cpp b/src/client/main.cpp index f22f43c..1bd5a5a 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -235,6 +235,7 @@ int main() } enable_high_qos(); + DwmEnableMMCSS(TRUE); try_set_game_environment(game); component_loader::create_components(game::environment::get_game()); diff --git a/src/client/std_include.hpp b/src/client/std_include.hpp index a9930f7..9ed4b2b 100644 --- a/src/client/std_include.hpp +++ b/src/client/std_include.hpp @@ -50,6 +50,7 @@ #include #include #include +#include // min and max is required by gdi, therefore NOMINMAX won't work #ifdef max