From 7ea9aa52f5e972b4206cc2a5123c9437555237e3 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Fri, 21 Oct 2022 22:08:38 +0100 Subject: [PATCH] Speed up reported guest GPU time Avoids triggering DRS in games in cases where it wouldn't actually benefit anything due to being CPU bottlenecked. --- app/src/main/cpp/skyline/soc/gm20b/engines/engine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/engine.cpp b/app/src/main/cpp/skyline/soc/gm20b/engines/engine.cpp index 5b864f3d..4434c092 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/engine.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/engine.cpp @@ -10,7 +10,10 @@ namespace skyline::soc::gm20b::engine { i64 nsTime{util::GetTimeNs()}; i64 timestamp{(nsTime / NsToTickDenominator) * NsToTickNumerator + ((nsTime % NsToTickDenominator) * NsToTickNumerator) / NsToTickDenominator}; - return static_cast(timestamp); + + // By reporting that less time has passed on the GPU than has actually passed we can avoid dynamic resolution kicking in + // TODO: add a setting for this after global settings + return static_cast(timestamp / 256); } MacroEngineBase::MacroEngineBase(MacroState ¯oState) : macroState(macroState) {}