Skip to content

Commit

Permalink
Chore: remove temps_windows
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 24, 2024
1 parent 0c90941 commit 5dbd6b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/detection/cpu/cpu_windows.c
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/detection/temps/temps_windows.h

This file was deleted.

0 comments on commit 5dbd6b9

Please sign in to comment.