From 50fa86bbbc403ad565eb44fcc281f16f77c69e15 Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Thu, 29 Oct 2026 19:23:21 -0400 Subject: [PATCH] nx2: fix the Linux (GCC) build of the vi2 present stats std::chrono::microseconds::rep is long on Linux and long long on Windows, so std::max over the long long stats and a converted duration did not compile with GCC. Return long long from the conversion. --- src/core/hle/service/nx2_gsv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/nx2_gsv.h b/src/core/hle/service/nx2_gsv.h index cfbd575f8b..e249b4911e 100644 --- a/src/core/hle/service/nx2_gsv.h +++ b/src/core/hle/service/nx2_gsv.h @@ -836,7 +836,10 @@ private: // game is blocked here while Eden's GPU thread catches up (fence) and composites. { using us = std::chrono::microseconds; - const auto to_us = [](auto d) { return std::chrono::duration_cast(d).count(); }; + // long long like the stats: microseconds::rep is long on Linux (std::max needs one type). + const auto to_us = [](auto d) -> long long { + return std::chrono::duration_cast(d).count(); + }; m_stats.fence_us += to_us(waited - entered); m_stats.composite_us += to_us(composited - waited); m_stats.pace_us += to_us(paced - composited);