ifdef linux for battery stuff

This commit is contained in:
flightlessmango 2021-03-16 10:07:25 +01:00
parent 1649c7f794
commit c3e5fc7496
3 changed files with 6 additions and 0 deletions

View File

@ -196,7 +196,9 @@ void Logger::try_log() {
currentLogData.previous = elapsedLog;
currentLogData.fps = fps;
currentLogData.frametime = frametime;
#ifdef __gnu_linux__
currentLogData.current_watt = Battery_Stats.current_watt;
#endif
m_log_array.push_back(currentLogData);
if (m_params->autostart_log)
writeFileContinuous(currentLogFile);

View File

@ -22,7 +22,9 @@ std::vector<logData> graph_data;
void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID)
{
#ifdef __gnu_linux__
Battery_Stats.update();
#endif
if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) {
cpuStats.UpdateCPUData();
#ifdef __gnu_linux__

View File

@ -1856,7 +1856,9 @@ static VkResult overlay_CreateSwapchainKHR(
std::string deviceName = prop.deviceName;
if (!is_blacklisted()) {
#ifdef __gnu_linux__
parse_pciids();
#endif
get_device_name(prop.vendorID, prop.deviceID, swapchain_data->sw_stats);
init_gpu_stats(device_data->properties.vendorID, device_data->instance->params);
init_system_info();