Commit 3ebd4b28 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Defer dialog mode swapchain recreation decision to Present

Avoids unnecessary swapchain recreations if the game calls SetDialogBoxMode multiple times per frame
parent 9647e449
Pipeline #995 passed with stage
in 4 minutes and 6 seconds
......@@ -115,7 +115,7 @@ namespace dxvk {
bool recreate = false;
recreate |= m_presenter == nullptr;
recreate |= window != m_window;
recreate |= m_dialogChanged;
recreate |= m_dialog != m_lastDialog;
m_window = window;
......@@ -127,7 +127,7 @@ namespace dxvk {
m_vsync = vsync;
m_dialogChanged = false;
m_lastDialog = m_dialog;
try {
if (recreate)
......@@ -400,8 +400,7 @@ namespace dxvk {
// However it doesn't appear to error at all in any of my tests of these
// cases described in the documentation.
m_dialogChanged = m_dialog != bEnableDialogs;
m_dialog = bEnableDialogs;
m_dialog = bEnableDialogs;
return D3D_OK;
}
......
......@@ -146,7 +146,7 @@ namespace dxvk {
bool m_vsync = true;
bool m_dialog;
bool m_dialogChanged = false;
bool m_lastDialog = false;
HWND m_window = nullptr;
HMONITOR m_monitor = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment