Added OnlyAcceptFirstHudless option

This commit is contained in:
cdozdil
2026-01-01 23:00:58 +03:00
parent f4b4b5a5e2
commit d6bb9c59d2
8 changed files with 36 additions and 5 deletions
+4
View File
@@ -89,6 +89,10 @@ VelocityValidNow=auto
; true or false - Default (auto) is false
HudlessValidNow=auto
; If source tags more than one hudless only use first one
; true or false - Default (auto) is false
OnlyAcceptFirstHudless=auto
+3
View File
@@ -117,6 +117,7 @@ bool Config::Reload(std::filesystem::path iniPath)
FGDepthValidNow.set_from_config(readBool("FrameGen", "DepthValidNow"));
FGVelocityValidNow.set_from_config(readBool("FrameGen", "VelocityValidNow"));
FGHudlessValidNow.set_from_config(readBool("FrameGen", "HudlessValidNow"));
FGOnlyAcceptFirstHudless.set_from_config(readBool("FrameGen", "OnlyAcceptFirstHudless"));
}
// FSR FG
@@ -712,6 +713,8 @@ bool Config::SaveIni()
GetBoolValue(Instance()->FGVelocityValidNow.value_for_config()).c_str());
ini.SetValue("FrameGen", "HudlessValidNow",
GetBoolValue(Instance()->FGHudlessValidNow.value_for_config()).c_str());
ini.SetValue("FrameGen", "OnlyAcceptFirstHudless",
GetBoolValue(Instance()->FGOnlyAcceptFirstHudless.value_for_config()).c_str());
}
// FSR FG output
+1
View File
@@ -402,6 +402,7 @@ class Config
CustomOptional<bool> FGDepthValidNow { false };
CustomOptional<bool> FGVelocityValidNow { false };
CustomOptional<bool> FGHudlessValidNow { false };
CustomOptional<bool> FGOnlyAcceptFirstHudless { false };
// OptiFG
CustomOptional<bool> FGEnabled { false };
+2 -2
View File
@@ -192,7 +192,7 @@ std::optional<std::filesystem::path> Util::NvngxPath()
if (ls == ERROR_SUCCESS)
{
wchar_t regNGXCorePath[260];
wchar_t regNGXCorePath[260] {};
DWORD NGXCorePathSize = 260;
ls = RegQueryValueExW(regNGXCore, L"NGXPath", nullptr, nullptr, (LPBYTE) regNGXCorePath, &NGXCorePathSize);
@@ -272,7 +272,7 @@ HWND Util::GetProcessWindow()
return hwnd;
}
inline std::string LogLastError()
static inline std::string LogLastError()
{
DWORD errorCode = GetLastError();
LPWSTR errorBuffer = nullptr;
+11 -2
View File
@@ -1136,8 +1136,17 @@ bool FSRFG_Dx12::SetResource(Dx12Resource* inputResource)
return false;
}
if (type == FG_ResourceType::HudlessColor && Config::Instance()->FGDisableHudless.value_or_default())
return false;
if (type == FG_ResourceType::HudlessColor)
{
if (Config::Instance()->FGDisableHudless.value_or_default())
return false;
if (!_noHudless[fIndex] && Config::Instance()->FGOnlyAcceptFirstHudless.value_or_default() &&
inputResource->validity != FG_ResourceValidity::UntilPresentFromDispatch)
{
return false;
}
}
if (type == FG_ResourceType::UIColor && Config::Instance()->FGDisableUI.value_or_default())
return false;
+6
View File
@@ -1026,6 +1026,12 @@ bool XeFG_Dx12::SetResource(Dx12Resource* inputResource)
{
return false;
}
if (!_noHudless[fIndex] && Config::Instance()->FGOnlyAcceptFirstHudless.value_or_default() &&
inputResource->validity != FG_ResourceValidity::UntilPresentFromDispatch)
{
return false;
}
}
if (type == FG_ResourceType::UIColor)
+1 -1
View File
@@ -18,7 +18,7 @@
#include <d3d12.h>
bool CheckForFGStatus()
static bool CheckForFGStatus()
{
// Need to check overlay menu parameter, goes to places it shouldn't go
// if (!Config::Instance()->OverlayMenu.value_or_default())
+8
View File
@@ -3255,6 +3255,14 @@ bool MenuCommon::RenderMenu()
ShowHelpMarker("Will use more VRAM but some games might need this");
ImGui::SameLine(0.0f, 16.0f);
bool firstHudless = config->FGOnlyAcceptFirstHudless.value_or_default();
if (ImGui::Checkbox("Only Accept First Hudless", &firstHudless))
config->FGOnlyAcceptFirstHudless = firstHudless;
ShowHelpMarker("If source tags more than one hudless only use first one");
if (bool skipReset = config->FGSkipReset.value_or_default();
ImGui::Checkbox("Skip Reset", &skipReset))
{