mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[d3d9] Defer dialog mode swapchain recreation decision to Present
Avoids unnecessary swapchain recreations if the game calls SetDialogBoxMode multiple times per frame
This commit is contained in:
parent
9647e449d2
commit
3ebd4b28a3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user