@@ -44,7 +44,9 @@ bool XeFG_Dx12::CreateSwapchainContext(ID3D12Device* device)
4444
4545 auto createResult = false ;
4646
47+ #ifndef DONT_USE_XMX
4748 ScopedSkipSpoofing skipSpoofing {};
49+ #endif // !DONT_USE_XMX
4850
4951 do
5052 {
@@ -386,8 +388,11 @@ bool XeFG_Dx12::CreateSwapchain(IDXGIFactory* factory, ID3D12CommandQueue* cmdQu
386388 if (Config::Instance ()->FGXeFGHighResMV .value_or_default ())
387389 _constants.flags |= FG_Flags::DisplayResolutionMVs;
388390
389- xefg_swapchain_result_t result;
391+ # ifndef DONT_USE_XMX
390392 ScopedSkipSpoofing skipSpoofing {};
393+ #endif // !DONT_USE_XMX
394+
395+ xefg_swapchain_result_t result;
391396 result = XeFGProxy::D3D12InitFromSwapChainDesc ()(_swapChainContext, hwnd, &scDesc, &fsDesc, realQueue, factory12,
392397 ¶ms);
393398
@@ -547,8 +552,11 @@ bool XeFG_Dx12::CreateSwapchain1(IDXGIFactory* factory, ID3D12CommandQueue* cmdQ
547552
548553 State::Instance ().skipSpoofing = true ;
549554
550- xefg_swapchain_result_t result;
555+ # ifndef DONT_USE_XMX
551556 ScopedSkipSpoofing skipSpoofing {};
557+ #endif // !DONT_USE_XMX
558+
559+ xefg_swapchain_result_t result;
552560 result = XeFGProxy::D3D12InitFromSwapChainDesc ()(_swapChainContext, hwnd, desc, pFullscreenDesc, realQueue,
553561 factory12, ¶ms);
554562
@@ -723,7 +731,10 @@ bool XeFG_Dx12::Dispatch()
723731 auto uiState =
724732 _uiComposition ? XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_ENABLED : XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_DISABLED ;
725733
734+ #ifndef DONT_USE_XMX
726735 ScopedSkipSpoofing skipSpoofing {};
736+ #endif // !DONT_USE_XMX
737+
727738 auto uiResult = XeFGProxy::SetUiCompositionState ()(_swapChainContext, uiState);
728739
729740 if (uiResult != XEFG_SWAPCHAIN_RESULT_SUCCESS )
@@ -747,7 +758,9 @@ bool XeFG_Dx12::Dispatch()
747758
748759 state.WAR_xefgRequestFGToggle = true ;
749760
761+ #ifndef DONT_USE_XMX
750762 ScopedSkipSpoofing skipSpoofing {};
763+ #endif // !DONT_USE_XMX
751764
752765 auto intResult = XeFGProxy::SetNumInterpolatedFrames ()(
753766 _swapChainContext, Config::Instance ()->FGXeFGInterpolationCount .value_or_default ());
0 commit comments