Reduced swapchain operation delay from 500 to 100

This commit is contained in:
cdozdil
2026-05-10 18:57:44 +02:00
committed by FakeMichau
parent d7e98b005e
commit e95813606f
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -106,8 +106,8 @@ inline static HRESULT hkCreateDXGIFactory(REFIID riid, IDXGIFactory** ppFactory)
if (Config::Instance()->DxgiFactoryWrapping.value_or_default() &&
Util::GetCallerModule(_ReturnAddress()) == slInterposerModule)
{
LOG_DEBUG("Delaying 500ms");
std::this_thread::sleep_for(std::chrono::milliseconds(500));
LOG_DEBUG("Delaying 100ms");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
HRESULT result;
@@ -166,8 +166,8 @@ inline static HRESULT hkCreateDXGIFactory1(REFIID riid, IDXGIFactory1** ppFactor
if (Config::Instance()->DxgiFactoryWrapping.value_or_default() &&
Util::GetCallerModule(_ReturnAddress()) == slInterposerModule)
{
LOG_DEBUG("Delaying 500ms");
std::this_thread::sleep_for(std::chrono::milliseconds(500));
LOG_DEBUG("Delaying 100ms");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
HRESULT result;
@@ -227,8 +227,8 @@ inline static HRESULT hkCreateDXGIFactory2(UINT Flags, REFIID riid, IDXGIFactory
if (Config::Instance()->DxgiFactoryWrapping.value_or_default() &&
Util::GetCallerModule(_ReturnAddress()) == slInterposerModule)
{
LOG_DEBUG("Delaying 500ms");
std::this_thread::sleep_for(std::chrono::milliseconds(500));
LOG_DEBUG("Delaying 100ms");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
HRESULT result;
+2 -2
View File
@@ -530,7 +530,7 @@ HRESULT FGHooks::hkResizeBuffers(IDXGISwapChain* This, UINT BufferCount, UINT Wi
if (State::Instance().SCLastFlags != SwapChainFlags)
{
LOG_WARN("SwapChainFlags changed from {} to {}", State::Instance().SCLastFlags, SwapChainFlags);
LOG_WARN("SwapChainFlags changed from {:X} to {:X}", State::Instance().SCLastFlags, SwapChainFlags);
if (State::Instance().activeFgOutput == FGOutput::XeFG)
{
@@ -767,7 +767,7 @@ HRESULT FGHooks::hkResizeBuffers1(IDXGISwapChain3* This, UINT BufferCount, UINT
if (State::Instance().SCLastFlags != SwapChainFlags)
{
LOG_WARN("SwapChainFlags changed from {} to {}", State::Instance().SCLastFlags, SwapChainFlags);
LOG_WARN("SwapChainFlags changed from {:X} to {:X}", State::Instance().SCLastFlags, SwapChainFlags);
if (State::Instance().activeFgOutput == FGOutput::XeFG)
{