diff --git a/CMakeLists.txt b/CMakeLists.txt index fec2f9729..ea2c93f3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -723,6 +723,7 @@ elseif(WIN32) src/detection/btrfs/btrfs_nosupport.c src/detection/chassis/chassis_windows.c src/detection/cpu/cpu_windows.c + src/detection/cpu/cpu_windows.cpp src/detection/cpucache/cpucache_windows.c src/detection/cpuusage/cpuusage_windows.c src/detection/cursor/cursor_windows.c @@ -757,7 +758,6 @@ elseif(WIN32) src/detection/terminalfont/terminalfont_windows.c src/detection/terminalshell/terminalshell_windows.c src/detection/terminalsize/terminalsize_windows.c - src/detection/temps/temps_windows.cpp src/detection/theme/theme_nosupport.c src/detection/uptime/uptime_windows.c src/detection/users/users_windows.c diff --git a/src/detection/cpu/cpu_windows.c b/src/detection/cpu/cpu_windows.c index 411ffe6f7..7479ff6d1 100644 --- a/src/detection/cpu/cpu_windows.c +++ b/src/detection/cpu/cpu_windows.c @@ -1,5 +1,4 @@ #include "cpu.h" -#include "detection/temps/temps_windows.h" #include "util/windows/registry.h" #include "util/windows/nt.h" #include "util/mallocHelper.h" @@ -160,6 +159,8 @@ static const char* detectCoreTypes(FFCPUResult* cpu) return NULL; } +const char* detectThermalTemp(double* current, double* critical); + const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) { detectNCores(cpu); @@ -175,7 +176,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) detectMaxSpeedBySmbios(cpu); if(options->temp) - ffDetectSmbiosTemp(&cpu->temperature, NULL); + detectThermalTemp(&cpu->temperature, NULL); return NULL; } diff --git a/src/detection/temps/temps_windows.cpp b/src/detection/cpu/cpu_windows.cpp similarity index 90% rename from src/detection/temps/temps_windows.cpp rename to src/detection/cpu/cpu_windows.cpp index ac9fccab6..4a961d4c5 100644 --- a/src/detection/temps/temps_windows.cpp +++ b/src/detection/cpu/cpu_windows.cpp @@ -1,11 +1,7 @@ -extern "C" -{ -#include "temps_windows.h" -} #include "util/windows/wmi.hpp" extern "C" -const char* ffDetectSmbiosTemp(double* current, double* critical) +const char* detectThermalTemp(double* current, double* critical) { // Requires Administrator privileges // https://wutils.com/wmi/root/wmi/msacpi_thermalzonetemperature/#properties diff --git a/src/detection/temps/temps_windows.h b/src/detection/temps/temps_windows.h deleted file mode 100644 index 501cc0aa7..000000000 --- a/src/detection/temps/temps_windows.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -const char* ffDetectSmbiosTemp(double* current, double* critical);