Resolve a freeze when trying to change Vsync with XeFG active

This commit is contained in:
FakeMichau
2026-04-04 22:37:43 +02:00
parent f4f9f743fe
commit e365ecf35c
3 changed files with 15 additions and 9 deletions
+2
View File
@@ -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;
+12 -6
View File
@@ -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);
+1 -3
View File
@@ -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;
}
}