sed s/gnu_linux/linux/g

pull/609/head
jackun 3 years ago
parent 90e48f95ca
commit 9b6a39dfe9
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -29,7 +29,7 @@ std::string get_basename(const std::string&& path)
return path;
}
#ifdef __gnu_linux__
#ifdef __linux__
bool find_folder(const char* root, const char* prefix, std::string& dest)
{
@ -199,4 +199,4 @@ std::string get_config_dir()
return path;
}
#endif // __gnu_linux__
#endif // __linux__

@ -348,7 +348,7 @@ void HudElements::vram(){
}
void HudElements::ram(){
#ifdef __gnu_linux__
#ifdef __linux__
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_ram]){
ImGui::TableNextRow(); ImGui::TableNextColumn();
ImGui::TextColored(HUDElements.colors.ram, "RAM");
@ -373,7 +373,7 @@ void HudElements::ram(){
void HudElements::procmem()
{
#ifdef __gnu_linux__
#ifdef __linux__
const char* unit = nullptr;
if (!HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_procmem])
return;
@ -653,7 +653,7 @@ void HudElements::vkbasalt(){
}
void HudElements::battery(){
#ifdef __gnu_linux__
#ifdef __linux__
if (Battery_Stats.batt_count > 0) {
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery]) {
ImGui::TableNextRow(); ImGui::TableNextColumn();
@ -781,7 +781,7 @@ void HudElements::graphs(){
HUDElements.min = 0;
ImGui::TextColored(HUDElements.colors.engine, "%s", "VRAM");
}
#ifdef __gnu_linux__
#ifdef __linux__
if (value == "ram"){
if (!HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_ram])
HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_ram] = true;

@ -18,7 +18,7 @@ std::unique_ptr<Logger> logger;
string exec(string command) {
char buffer[128];
string result = "";
#ifdef __gnu_linux__
#ifdef __linux__
// Open pipe to file
FILE* pipe = popen(command.c_str(), "r");

@ -23,7 +23,7 @@
#include "pci_ids.h"
#include "timing.hpp"
#ifdef __gnu_linux__
#ifdef __linux__
#include <libgen.h>
#include <unistd.h>
#endif
@ -45,14 +45,14 @@ const char* engines[] = {"Unknown", "OpenGL", "VULKAN", "DXVK", "VKD3D", "DAMAVA
void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID)
{
#ifdef __gnu_linux__
#ifdef __linux__
if (params.enabled[OVERLAY_PARAM_ENABLED_battery]) {
Battery_Stats.update();
}
#endif
if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) {
cpuStats.UpdateCPUData();
#ifdef __gnu_linux__
#ifdef __linux__
if (params.enabled[OVERLAY_PARAM_ENABLED_core_load] || params.enabled[OVERLAY_PARAM_ENABLED_cpu_mhz])
cpuStats.UpdateCoreMhz();
@ -72,7 +72,7 @@ void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& par
// get ram usage/max
#ifdef __gnu_linux__
#ifdef __linux__
if (params.enabled[OVERLAY_PARAM_ENABLED_ram] || params.enabled[OVERLAY_PARAM_ENABLED_swap] || logger->is_active())
update_meminfo();
if (params.enabled[OVERLAY_PARAM_ENABLED_procmem])
@ -87,7 +87,7 @@ void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& par
currentLogData.gpu_mem_clock = gpu_info.MemClock;
currentLogData.gpu_vram_used = gpu_info.memoryUsed;
currentLogData.gpu_power = gpu_info.powerUsage;
#ifdef __gnu_linux__
#ifdef __linux__
currentLogData.ram_used = memused;
#endif
@ -520,7 +520,7 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2&
void init_cpu_stats(overlay_params& params)
{
#ifdef __gnu_linux__
#ifdef __linux__
auto& enabled = params.enabled;
enabled[OVERLAY_PARAM_ENABLED_cpu_stats] = cpuStats.Init()
&& enabled[OVERLAY_PARAM_ENABLED_cpu_stats];
@ -582,7 +582,7 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params)
params.enabled[OVERLAY_PARAM_ENABLED_gpu_stats] = false;
}
#ifdef __gnu_linux__
#ifdef __linux__
if (vendorID == 0x8086 || vendorID == 0x1002
|| gpu.find("Radeon") != std::string::npos
|| gpu.find("AMD") != std::string::npos) {
@ -671,7 +671,7 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params)
}
void init_system_info(){
#ifdef __gnu_linux__
#ifdef __linux__
const char* ld_preload = getenv("LD_PRELOAD");
if (ld_preload)
unsetenv("LD_PRELOAD");
@ -768,7 +768,7 @@ void init_system_info(){
void get_device_name(int32_t vendorID, int32_t deviceID, struct swapchain_stats& sw_stats)
{
#ifdef __gnu_linux__
#ifdef __linux__
if (pci_ids.find(vendorID) == pci_ids.end())
parse_pciids();

@ -5,7 +5,7 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#ifdef __gnu_linux__
#ifdef __linux__
#include <wordexp.h>
#include <unistd.h>
#endif

@ -1548,7 +1548,7 @@ static VkResult overlay_CreateSwapchainKHR(
std::string deviceName = prop.deviceName;
if (!is_blacklisted()) {
#ifdef __gnu_linux__
#ifdef __linux__
get_device_name(prop.vendorID, prop.deviceID, swapchain_data->sw_stats);
#endif
}
@ -1940,7 +1940,7 @@ static VkResult overlay_CreateInstance(
}
if (!is_blacklisted()) {
#ifdef __gnu_linux__
#ifdef __linux__
init_system_info();
instance_data->notifier.params = &instance_data->params;
start_notifier(instance_data->notifier);
@ -1974,7 +1974,7 @@ static void overlay_DestroyInstance(
struct instance_data *instance_data = FIND(struct instance_data, instance);
instance_data_map_physical_devices(instance_data, false);
instance_data->vtable.DestroyInstance(instance, pAllocator);
#ifdef __gnu_linux__
#ifdef __linux__
if (!is_blacklisted())
stop_notifier(instance_data->notifier);
#endif

Loading…
Cancel
Save