mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-28 17:16:46 +00:00
Resolve a freeze when trying to change Vsync with XeFG active
This commit is contained in:
@@ -183,6 +183,8 @@ class State
|
||||
float lastMipBiasMax = -100.0f;
|
||||
|
||||
int xefgMaxInterpolationCount = 1;
|
||||
bool WAR_xefgRequestFGToggle = false;
|
||||
|
||||
int dlssgMaxInterpolationCount = 1;
|
||||
bool dlssgDMFGSupported = false;
|
||||
sl::DLSSGMode dlssgLastSetMode = sl::DLSSGMode::eOff;
|
||||
|
||||
@@ -725,9 +725,7 @@ bool XeFG_Dx12::Dispatch()
|
||||
{
|
||||
// To prevent XeLL issues
|
||||
LOG_DEBUG("UI Composition state changed {}, skipping rendering for 10 frames", _uiComposition);
|
||||
state.FGchanged = true;
|
||||
UpdateTarget();
|
||||
Deactivate();
|
||||
state.WAR_xefgRequestFGToggle = true;
|
||||
|
||||
_uiComposition = Config::Instance()->FGXeFGUIComposition.value_or_default();
|
||||
|
||||
@@ -756,9 +754,7 @@ bool XeFG_Dx12::Dispatch()
|
||||
LOG_INFO("Interpolation count changed {} -> {}", _framesToInterpolate,
|
||||
Config::Instance()->FGXeFGInterpolationCount.value_or_default());
|
||||
|
||||
state.FGchanged = true;
|
||||
UpdateTarget();
|
||||
Deactivate();
|
||||
state.WAR_xefgRequestFGToggle = true;
|
||||
|
||||
ScopedSkipSpoofing skipSpoofing {};
|
||||
|
||||
@@ -775,6 +771,16 @@ bool XeFG_Dx12::Dispatch()
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for wrong frame limit
|
||||
if (state.WAR_xefgRequestFGToggle)
|
||||
{
|
||||
state.WAR_xefgRequestFGToggle = false;
|
||||
|
||||
state.FGchanged = true;
|
||||
UpdateTarget();
|
||||
Deactivate();
|
||||
}
|
||||
|
||||
if (!_haveHudless.has_value())
|
||||
{
|
||||
_haveHudless = IsUsingHudless(fIndex);
|
||||
|
||||
@@ -5436,9 +5436,7 @@ bool MenuCommon::RenderMenu()
|
||||
{
|
||||
// To prevent XeLL issues
|
||||
LOG_DEBUG("V-Sync change detected, forcing XeFG reset");
|
||||
state.FGchanged = true;
|
||||
state.currentFG->UpdateTarget();
|
||||
state.currentFG->Deactivate();
|
||||
state.WAR_xefgRequestFGToggle = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user