Updated to use the new plugin
This commit is contained in:
parent
174a73d160
commit
509d6aab73
36 changed files with 788 additions and 753 deletions
21
Source/HarmonyLink/Private/Structs/Battery.cpp
Normal file
21
Source/HarmonyLink/Private/Structs/Battery.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright (C) 2023 Jordon Brooks
|
||||
|
||||
#include "Structs/Battery.h"
|
||||
|
||||
#include <Structs/FBattery.h>
|
||||
|
||||
FBattery::FBattery(HarmonyLinkLib::FBattery* battery)
|
||||
{
|
||||
if (battery)
|
||||
{
|
||||
HasBattery = battery->has_battery;
|
||||
IsACConnected = battery->is_connected_to_ac;
|
||||
BatteryPercent = battery->battery_percent;
|
||||
|
||||
battery->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("Failed to convert FBattery."))
|
||||
}
|
||||
}
|
25
Source/HarmonyLink/Private/Structs/CPUInfo.cpp
Normal file
25
Source/HarmonyLink/Private/Structs/CPUInfo.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2023 Jordon Brooks
|
||||
|
||||
#include "Structs/CPUInfo.h"
|
||||
|
||||
FCPUInfo::FCPUInfo(HarmonyLinkLib::FCPUInfo* cpu_info)
|
||||
{
|
||||
if (cpu_info)
|
||||
{
|
||||
VendorID = cpu_info->VendorID.c_str();
|
||||
ModelName = cpu_info->Model_Name.c_str();
|
||||
PhysicalCores = cpu_info->Physical_Cores;
|
||||
LogicalCores = cpu_info->Logical_Cores;
|
||||
|
||||
for (const HarmonyLinkLib::FString& Flag : cpu_info->Flags)
|
||||
{
|
||||
Flags.Add(Flag.c_str());
|
||||
}
|
||||
|
||||
cpu_info->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("Failed to convert FCPUInfo."))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue