Skip to content

Commit

Permalink
hotfix to re-enable remix ui in x64 standalone tests
Browse files Browse the repository at this point in the history
See merge request lightspeedrtx/dxvk-remix-nv!1098
  • Loading branch information
nv-nfreybler committed Oct 22, 2024
2 parents 1aaa2aa + 704f555 commit 8e0992a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/d3d9/d3d9_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "../dxvk/dxvk_device.h"
#include "../dxvk/dxvk_objects.h"
#include "../util/util_env.h"
#include "../util/util_once.h"
#include "../util/util_string.h"
#include "../dxvk/rtx_render/rtx_bridge_message_channel.h"
#include "../dxvk/dxvk_scoped_annotation.h"
Expand Down Expand Up @@ -226,7 +227,7 @@ namespace dxvk {
const auto swapchainRefCnt = windowData.swapchain->Release();
const bool bSkipSwapchainActions = (swapchainRefCnt == 0);
if(bSkipSwapchainActions) {
Logger::warn("[D3D9WindowProc] Swapchain handle is invalid, some of its values may not be correct.");
ONCE(Logger::warn("[D3D9WindowProc] Swapchain handle is invalid, some of its values may not be correct."));
}

// It is potentially unsafe to access the swapchain in this function and may result in
Expand Down Expand Up @@ -264,12 +265,14 @@ namespace dxvk {
PostMessageW(window, WM_ACTIVATEAPP, 1, GetCurrentThreadId());
}

if(!bSkipSwapchainActions) {
auto& gui = windowData.swapchain->getDxvkDevice()->getCommon()->getImgui();
if(gui.isInit()) {
gui.wndProcHandler(window, message, wParam, lParam);
}
// Safe from bSkipSwapchainActions as we're just getting a handle that shouldn't
// be invalidated
auto& gui = windowData.swapchain->getDxvkDevice()->getCommon()->getImgui();
if(gui.isInit()) {
gui.wndProcHandler(window, message, wParam, lParam);
}

if(!bSkipSwapchainActions) {
if (!present_parms.Windowed && env::isRemixBridgeActive()) {
FSEState state = ProcessFullscreenExclusiveMessages(window, message, wParam, lParam);

Expand Down

0 comments on commit 8e0992a

Please sign in to comment.