diff --git a/OptiScaler/hooks/Streamline_Hooks.cpp b/OptiScaler/hooks/Streamline_Hooks.cpp index 9fff6ff1..79772c00 100644 --- a/OptiScaler/hooks/Streamline_Hooks.cpp +++ b/OptiScaler/hooks/Streamline_Hooks.cpp @@ -611,31 +611,27 @@ sl::Result StreamlineHooks::hkslDLSSGGetState(const sl::ViewportHandle& viewport auto result = o_slDLSSGGetState(viewport, state, options); - LOG_DEBUG("DLSSG State Status: {}, numFramesActuallyPresented: {}", magic_enum::enum_name(state.status), - state.numFramesActuallyPresented); - auto& s = State::Instance(); auto fg = s.currentFG; - static UINT64 lastFrameCount = 0; - if (fg != nullptr) { state.estimatedVRAMUsageInBytes = 256 * 1024 * 1024; auto fc = s.frameCount; - if (lastFrameCount == 0) - state.numFramesActuallyPresented = 1; + if (fg->IsActive() && !fg->IsPaused()) + state.numFramesActuallyPresented = 2; else - state.numFramesActuallyPresented = static_cast(fc - lastFrameCount); - - lastFrameCount = fc; + state.numFramesActuallyPresented = 1; state.lastPresentInputsProcessingCompletionFenceValue = fg->FrameCount(); state.numFramesToGenerateMax = 1; } + LOG_DEBUG("Status: {}, numFramesActuallyPresented: {}", magic_enum::enum_name(state.status), + state.numFramesActuallyPresented); + return result; }