From 5e35cc8ff85516e3301d2fa808f45c48c1c35859 Mon Sep 17 00:00:00 2001 From: cdozdil Date: Tue, 10 Feb 2026 02:20:42 +0300 Subject: [PATCH] Minor updates to streamline hooks --- OptiScaler/hooks/Streamline_Hooks.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/OptiScaler/hooks/Streamline_Hooks.cpp b/OptiScaler/hooks/Streamline_Hooks.cpp index b328f7ed..f3f43aaf 100644 --- a/OptiScaler/hooks/Streamline_Hooks.cpp +++ b/OptiScaler/hooks/Streamline_Hooks.cpp @@ -541,9 +541,7 @@ bool StreamlineHooks::hkdlssg_slOnPluginLoad(void* params, const char* loaderJSO if (configJson.contains("vsync")) configJson["vsync"]["supported"] = true; // disable eVSyncOffRequired - if (configJson.contains("hws")) - configJson["hws"]["required"] = false; // disable eHardwareSchedulingRequired - + configJson["external"]["hws"]["required"] = false; // disable eHardwareSchedulingRequired configJson["external"]["feature"]["tags"].clear(); // We handle the DLSSG resources } @@ -665,15 +663,20 @@ sl::Result StreamlineHooks::hkslDLSSGGetState(const sl::ViewportHandle& viewport if (fg != nullptr) { - state.estimatedVRAMUsageInBytes = 256 * 1024 * 1024; + if (options != nullptr && options->flags & sl::DLSSGFlags::eRequestVRAMEstimate) + state.estimatedVRAMUsageInBytes = static_cast(256 * 1024) * 1024; if (fg->IsActive() && !fg->IsPaused()) state.numFramesActuallyPresented = 2; else state.numFramesActuallyPresented = 1; + } + else + { + state.numFramesActuallyPresented = 1; + } state.numFramesToGenerateMax = 1; - } LOG_DEBUG("Status: {}, numFramesActuallyPresented: {}", magic_enum::enum_name(state.status), state.numFramesActuallyPresented);