Fix building with mingw

pull/830/merge
FlightlessMango 1 year ago
parent c263bd1fb5
commit 06b46fd5d7

@ -1,6 +1,8 @@
#include <spdlog/spdlog.h>
#include <thread>
#ifdef __linux__
#include <sys/sysinfo.h>
#endif
#include "amdgpu.h"
#include "gpu.h"
#include "cpu.h"

@ -7,7 +7,9 @@
#include <cstdio>
#include <memory>
#include <string>
#ifdef WIN32
#include <windows.h>
#endif
#include "timing.hpp"
typedef struct CPUData_ {
@ -157,5 +159,7 @@ private:
};
extern CPUStats cpuStats;
#ifdef WIN32
uint64_t FileTimeToInt64( const FILETIME& ft );
#endif
#endif //MANGOHUD_CPU_H

@ -206,9 +206,11 @@ void Logger::stop_logging() {
output_file.close();
writeSummary(m_log_files.back());
clear_log_data();
#ifdef __linux__
control_client_check(HUDElements.params->control, global_control_client, gpu.c_str());
const char * cmd = "LoggingFinished";
control_send(global_control_client, cmd, strlen(cmd), 0, 0);
#endif
}
void Logger::logging(){

@ -3,7 +3,6 @@
#if KIERO_INCLUDE_D3D11
#include "d3d11_hook.h"
#include <d3d11.h>
#include <assert.h>
#include <intrin.h>

@ -1,6 +1,7 @@
#pragma once
#ifndef __D3D11_IMPL_H__
#define __D3D11_IMPL_H__
#include <d3d11.h>
namespace impl
{
namespace d3d11
@ -8,6 +9,6 @@ namespace impl
void init();
}
}
long __stdcall hkPresent11(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
#endif // __D3D11_IMPL_H__

@ -1,3 +1,4 @@
#pragma once
#include <dxgi.h>
#include <dxgi1_5.h>
#include <dxgi1_4.h>
@ -16,6 +17,6 @@ namespace impl
void init();
}
}
long __fastcall hkPresent12(IDXGISwapChain3* pSwapChain, UINT SyncInterval, UINT Flags);
#endif // __D3D12_IMPL_H__

@ -1,8 +1,8 @@
#include "kiero.h"
#include "windows.h"
#include <dxgi.h>
#include "kiero.h"
#include <cstdio>
#include "dxgi.h"
#ifdef _UNICODE
# define KIERO_TEXT(text) L##text

@ -0,0 +1,2 @@
#pragma once
uint32_t get_device_id_dxgi();

@ -1,8 +1,7 @@
#include "windows.h"
#include <cstdio>
#include "kiero.h"
#include <vector>
#include "win_shared.h"
#if KIERO_INCLUDE_D3D11
# include "d3d11_hook.h"
#endif

@ -0,0 +1,6 @@
#pragma once
#include "windows.h"
void ConsoleSetup();
void renderTypes();
int MainThread();
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID);
Loading…
Cancel
Save