From 5f7d4136cd92b41ce6f5b3f7632fec036a72a56e Mon Sep 17 00:00:00 2001 From: Drath Date: Sat, 2 May 2026 00:57:21 +0200 Subject: [PATCH] add a lil code so it shows metrics ver on start, since we'll need to parse 9070xt soon heheh --- src/gpu.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gpu.cpp b/src/gpu.cpp index 80f4f03..2c85f33 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -24,7 +24,12 @@ int detect(gpuSensors* target, const std::string& pci) { applog(LOG::INF, "Detected path \"{}\"", target->hwmon); if (utils::fileExists(target->hwmon + rel_metrics_path)) { - applog(LOG::INF, "Found gpu_metrics"); + std::array raw_metrics{}; + if (!utils::readFile(target->hwmon + rel_metrics_path, raw_metrics)) + return -1; + const auto header = reinterpret_cast(raw_metrics.data()); + + applog(LOG::INF, "Found gpu_metrics_v{}_{}", header->format_revision, header->content_revision); target->hasGpuMetrics = true; } return 0;