ifdef linux for battery stuff

win-gl
flightlessmango 4 years ago
parent 1649c7f794
commit c3e5fc7496

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

@ -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) void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID)
{ {
#ifdef __gnu_linux__
Battery_Stats.update(); Battery_Stats.update();
#endif
if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) { if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) {
cpuStats.UpdateCPUData(); cpuStats.UpdateCPUData();
#ifdef __gnu_linux__ #ifdef __gnu_linux__

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

Loading…
Cancel
Save