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) {