mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-24 07:06:33 +00:00
Reduced swapchain operation delay from 500 to 100
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user