From 6f8e2e2abdaecbe1a2161687dfad0276e82a5010 Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 1 Jan 2026 16:34:55 +0100 Subject: [PATCH] get rid of macros2 --- src/gpu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpu.cpp b/src/gpu.cpp index abff8e2..cc06bcf 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -17,7 +17,7 @@ void detectHwmon(gpuSensors* target, const std::string& pci) { target->hwmon = utils::getFirstDir("/sys/bus/pci/devices/" + pci + "/hwmon"); applog(LOG::INF, "Detected path \"{}\"", target->hwmon); - if(utils::fileExists(target->hwmon + REL_METRICS_PATH)) { + if(utils::fileExists(target->hwmon + rel_metrics_path)) { applog(LOG::INF, "found gpu_metrics"); target->hasGpuMetrics = true; } @@ -47,8 +47,8 @@ void updateFromFs(gpuSensors* g) { /* get sensors for vega and newer (rx5700xt, rx7800xt [*]) */ void updateFromMetrics(gpuSensors* g) { - char raw_metrics[MAX_METRICS_LENGTH]; - if (!utils::readFile(g->hwmon + REL_METRICS_PATH, raw_metrics, sizeof(raw_metrics))) return; + char raw_metrics[max_metrics_length]; + if (!utils::readFile(g->hwmon + rel_metrics_path, raw_metrics, sizeof(raw_metrics))) return; auto header = reinterpret_cast(raw_metrics); switch (header->format_revision * 10 + header->content_revision) {