Skip to content

Commit 1c4e484

Browse files
committed
Show base FPS only when FG is working
1 parent 9deefad commit 1c4e484

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎OptiScaler/menu/menu_common.cpp‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,8 +3001,14 @@ void MenuCommon::RenderPerformanceOverlay(RenderMenuContext& ctx)
30013001
: std::format("{} x{}", fg->Name(), fg->GetInterpolatedFrameCount() + 1);
30023002

30033003
const int fakeFramesCount = state.DlssgDetectedInterpolationCount();
3004+
3005+
// Nvngx/DLSSG paths report generation through the game's DLSSG frame count, not IsGenerating()
3006+
bool nvngxFgGenerating = false;
3007+
30043008
auto formatFg = [&](std::string_view name, int maxFakeFrames)
30053009
{
3010+
nvngxFgGenerating = fakeFramesCount > 0 && fakeFramesCount <= maxFakeFrames;
3011+
30063012
if (fakeFramesCount > maxFakeFrames)
30073013
return std::format("{} Doesn't support more than {}x", name, maxFakeFrames);
30083014

@@ -3150,8 +3156,9 @@ void MenuCommon::RenderPerformanceOverlay(RenderMenuContext& ctx)
31503156
shownAt = now;
31513157
}
31523158

3153-
// With an FG input also the measured base frame rate, the same as FPS shows that FG isn't generating
3154-
const std::string fpsValue = shown.baseFrameTime > 0.0
3159+
// With an FG input also the measured base frame rate, but only while FG is generating frames
3160+
const bool fgGenerating = (fg != nullptr && fg->IsGenerating()) || nvngxFgGenerating;
3161+
const std::string fpsValue = (shown.baseFrameTime > 0.0 && fgGenerating)
31553162
? StrFmt("%.1f/%.1f", shown.frameRate, 1000.0 / shown.baseFrameTime)
31563163
: StrFmt("%.1f", shown.frameRate);
31573164

@@ -4662,12 +4669,6 @@ static void RenderFGStatus(State& state, Config* config)
46624669
"You might need to select %s first",
46634670
name, name);
46644671
}
4665-
else if (input != FGInput::NvngxFG && !config->IsFGEnabled())
4666-
{
4667-
// The game controls Nvngx FG, the rest is set by Frame Gen in the output's settings
4668-
ImGui::SameLine();
4669-
ImGui::TextColored(StatusWarn(), "(turn on Frame Gen below)");
4670-
}
46714672
}
46724673

46734674
void MenuCommon::RenderFrameGenerationSelection(RenderMenuContext& ctx)

0 commit comments

Comments
 (0)