From e574cd46ff225f2d6a5a127ca002d245a1b97793 Mon Sep 17 00:00:00 2001 From: cdozdil Date: Mon, 18 May 2026 11:39:42 +0300 Subject: [PATCH] Fix for ResizeBuffers1 bracket error --- OptiScaler/resource.h | 2 +- OptiScaler/wrapped/wrapped_swapchain.cpp | 30 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/OptiScaler/resource.h b/OptiScaler/resource.h index 5512487a..dc9dce88 100644 --- a/OptiScaler/resource.h +++ b/OptiScaler/resource.h @@ -29,7 +29,7 @@ #define VER_MAJOR_VERSION 0 #define VER_MINOR_VERSION 9 #define VER_HOTFIX_VERSION 2 -#define VER_BUILD_NUMBER 1 +#define VER_BUILD_NUMBER 2 // #define VER_PRE_RELEASE diff --git a/OptiScaler/wrapped/wrapped_swapchain.cpp b/OptiScaler/wrapped/wrapped_swapchain.cpp index 71730e99..3d8e6225 100644 --- a/OptiScaler/wrapped/wrapped_swapchain.cpp +++ b/OptiScaler/wrapped/wrapped_swapchain.cpp @@ -1225,29 +1225,29 @@ HRESULT STDMETHODCALLTYPE WrappedIDXGISwapChain4::ResizeBuffers1(UINT BufferCoun } std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } #ifdef DXGI_DEBUG_ENABLED - ReportDXGILiveObjects(); + ReportDXGILiveObjects(); #ifdef ENABLE_DEBUG_LAYER_DX12 - ReportD3D12LiveObjects(State::Instance().currentD3D12Device); + ReportD3D12LiveObjects(State::Instance().currentD3D12Device); #endif #endif - if (Config::Instance()->FGDontUseSwapchainBuffers.value_or_default()) - { - ScopedSkipHeapCapture skipHeapCapture {}; + if (Config::Instance()->FGDontUseSwapchainBuffers.value_or_default()) + { + ScopedSkipHeapCapture skipHeapCapture {}; - _lastFlags = SwapChainFlags; - result = _real3->ResizeBuffers1(BufferCount, Width, Height, Format, SwapChainFlags, pCreationNodeMask, - ppPresentQueue); - } - else - { - _lastFlags = SwapChainFlags; - result = _real3->ResizeBuffers1(BufferCount, Width, Height, Format, SwapChainFlags, pCreationNodeMask, - ppPresentQueue); - } + _lastFlags = SwapChainFlags; + result = _real3->ResizeBuffers1(BufferCount, Width, Height, Format, SwapChainFlags, pCreationNodeMask, + ppPresentQueue); + } + else + { + _lastFlags = SwapChainFlags; + result = _real3->ResizeBuffers1(BufferCount, Width, Height, Format, SwapChainFlags, pCreationNodeMask, + ppPresentQueue); } #ifdef DXGI_DEBUG_ENABLED