Added FlipMetering disabling option

This commit is contained in:
cdozdila
2025-05-05 00:21:04 +03:00
parent 8251ec205a
commit feb9a2e4f2
4 changed files with 20 additions and 0 deletions
+10
View File
@@ -96,6 +96,11 @@ AlwaysTrackHeaps=auto
; true or false - Default (auto) is false
HudfixTrackRelease=auto
; CBV Track mode
; 0 = Don't Track | 1 = Track After Upscale | 2 = Always Track
; true or false - Default (auto) is 0
HudfixCBVTrackMode=auto
; Makes a copy of Depth to be used with Hudfix FG call
; Setting it false most probably cause occasional garbling
; true or false - Default (auto) is true
@@ -538,6 +543,11 @@ LoadReshade=auto
; true or false - Default (auto) is false for Nvidia, true for others
OverrideNvapiDll=auto
; Disable FlipMatering
; Fix the thick frametime graph caused by Nvidia's Flip Metering when using NukemFG, needs Fakenvapi to work
; true or false - Default (auto) is false for Nvidia, true for others
DisableFlipMetering=auto
; If nvapi override enabled and file path defined here
; will try to load it from here, otherwise will check current folder for nvapi64.dll
; Default (auto) is local folder
+2
View File
@@ -371,6 +371,7 @@ bool Config::Reload(std::filesystem::path iniPath)
{
OverrideNvapiDll.set_from_config(readBool("NvApi", "OverrideNvapiDll"));
NvapiDllPath.set_from_config(readWString("NvApi", "NvapiDllPath", true));
DisableFlipMetering.set_from_config(readBool("NvApi", "DisableFlipMetering"));
}
// Spoofing
@@ -806,6 +807,7 @@ bool Config::SaveIni()
{
ini.SetValue("NvApi", "OverrideNvapiDll", GetBoolValue(Instance()->OverrideNvapiDll.value_for_config()).c_str());
ini.SetValue("NvApi", "NvapiDllPath", wstring_to_string(Instance()->NvapiDllPath.value_for_config_or(L"auto")).c_str());
ini.SetValue("NvApi", "DisableFlipMetering", GetBoolValue(Instance()->DisableFlipMetering.value_for_config()).c_str());
}
// DRS
+1
View File
@@ -292,6 +292,7 @@ public:
// NVAPI Override
CustomOptional<bool> OverrideNvapiDll{ false };
CustomOptional<std::wstring, NoDefault> NvapiDllPath;
CustomOptional<bool> DisableFlipMetering{ false };
// Spoofing
CustomOptional<bool> DxgiSpoofing{ true };
+7
View File
@@ -69,6 +69,13 @@ void* __stdcall NvApiHooks::hkNvAPI_QueryInterface(unsigned int InterfaceId)
//LOG_DEBUG("counter: {} InterfaceId: {:X}", ++qiCounter, (uint32_t)InterfaceId);
// Disable flip metering
if (InterfaceId == 0xF3148C42 && Config::Instance()->DisableFlipMetering.value_or(!State::Instance().isRunningOnNvidia))
{
LOG_INFO("FlipMetering is disabled!");
return nullptr;
}
if (InterfaceId == GET_ID(NvAPI_D3D_SetSleepMode) ||
InterfaceId == GET_ID(NvAPI_D3D_Sleep) ||
InterfaceId == GET_ID(NvAPI_D3D_GetLatency) ||