Fix building with mingw

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

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

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

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

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

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

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

@ -1,8 +1,8 @@
#include "kiero.h" #include "kiero.h"
#include "windows.h" #include "windows.h"
#include <dxgi.h> #include <dxgi.h>
#include "kiero.h"
#include <cstdio> #include <cstdio>
#include "dxgi.h"
#ifdef _UNICODE #ifdef _UNICODE
# define KIERO_TEXT(text) L##text # 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 <cstdio>
#include "kiero.h" #include "kiero.h"
#include <vector> #include <vector>
#include "win_shared.h"
#if KIERO_INCLUDE_D3D11 #if KIERO_INCLUDE_D3D11
# include "d3d11_hook.h" # include "d3d11_hook.h"
#endif #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