1
0
Fork 0
mirror of https://gitlab.com/Mr_Goldberg/goldberg_emulator.git synced 2024-11-14 10:50:13 +01:00

Created a define to not compile overlay.

This commit is contained in:
Nemirtingas 2019-08-14 15:09:57 +02:00
parent 40d7237ab0
commit d87760b78b
16 changed files with 36 additions and 34 deletions

View file

@ -1,5 +1,7 @@
#include "Base_Hook.h"
#ifndef NO_OVERLAY
#include <algorithm>
#include "Hook_Manager.h"
@ -38,4 +40,6 @@ void Base_Hook::HookFunc(std::pair<void**, void*> hook)
{
if( DetourAttach(hook.first, hook.second) == 0 )
_hooked_funcs.emplace_back(hook);
}
}
#endif//NO_OVERLAY

View file

@ -3,7 +3,7 @@
#include "../dll/base.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
@ -49,6 +49,6 @@ public:
}
};
#endif
#endif//NO_OVERLAY
#endif//__INCLUDED_BASE_HOOK_H__

View file

@ -1,6 +1,6 @@
#include "../dll/base.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include "DX10_Hook.h"
#include "Hook_Manager.h"
@ -214,4 +214,4 @@ void DX10_Hook::loadFunctions(ID3D10Device *pDevice, IDXGISwapChain *pSwapChain)
#undef LOAD_FUNC
}
#endif
#endif//NO_OVERLAY

View file

@ -2,7 +2,7 @@
#define __INCLUDED_DX10_HOOK_H__
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <d3d10.h>
#include "DirectX_VTables.h"
@ -48,6 +48,6 @@ public:
void loadFunctions(ID3D10Device *pDevice, IDXGISwapChain *pSwapChain);
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_DX10_HOOK_H__

View file

@ -1,6 +1,6 @@
#include "../dll/base.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include "DX11_Hook.h"
#include "Hook_Manager.h"
@ -233,4 +233,4 @@ void DX11_Hook::loadFunctions(ID3D11Device *pDevice, IDXGISwapChain *pSwapChain)
#undef LOAD_FUNC
}
#endif
#endif//NO_OVERLAY

View file

@ -2,7 +2,7 @@
#define __INCLUDED_DX11_HOOK_H__
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <d3d11.h>
#include "DirectX_VTables.h"
@ -48,6 +48,6 @@ public:
void loadFunctions(ID3D11Device *pDevice, IDXGISwapChain *pSwapChain);
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_DX11_HOOK_H__

View file

@ -1,6 +1,6 @@
#include "../dll/base.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include "DX12_Hook.h"
#include "Hook_Manager.h"
@ -189,4 +189,4 @@ void DX12_Hook::loadFunctions(ID3D12Device *pDevice, IDXGISwapChain *pSwapChain)
#undef LOAD_FUNC
}
#endif
#endif//NO_OVERLAY

View file

@ -2,7 +2,7 @@
#define __INCLUDED_DX12_HOOK_H__
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <d3d12.h>
#include "DirectX_VTables.h"
@ -48,5 +48,5 @@ public:
void loadFunctions(ID3D12Device *pDevice, IDXGISwapChain *pSwapChain);
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_DX12_HOOK_H__

View file

@ -1,6 +1,6 @@
#include "DX9_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include "Hook_Manager.h"
@ -227,4 +227,4 @@ void DX9_Hook::loadFunctions(IDirect3DDevice9Ex* pDeviceEx)
#undef LOAD_FUNC
}
#endif
#endif//NO_OVERLAY

View file

@ -2,7 +2,7 @@
#define __INCLUDED_DX9_HOOK_H__
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <d3d9.h>
#include "DirectX_VTables.h"
@ -49,6 +49,6 @@ public:
void loadFunctions(IDirect3DDevice9Ex *pDeviceEx);
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_DX9_HOOK_H__

View file

@ -1,6 +1,8 @@
#include "../dll/dll.h"
#include "Hook_Manager.h"
#ifndef NO_OVERLAY
#include "../detours/detours.h"
#include "DX12_Hook.h"
@ -172,4 +174,6 @@ void Hook_Manager::ChangeGameWindow(HWND hWnd) const
void Hook_Manager::CallOverlayProc(int width, int height) const
{
overlay->OverlayProc(width, height);
}
}
#endif//NO_OVERLAY

View file

@ -3,7 +3,7 @@
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <Windows.h>
#include <vector>
@ -45,6 +45,6 @@ public:
Steam_Overlay* GetOverlay() const { return overlay; }
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_HOOK_BASE_H__

View file

@ -1,6 +1,6 @@
#include "../dll/base.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include "OpenGL_Hook.h"
#include "Hook_Manager.h"
@ -152,4 +152,4 @@ void OpenGL_Hook::Create()
}
}
#endif
#endif//NO_OVERLAY

View file

@ -2,7 +2,7 @@
#define __INCLUDED_OPENGL_HOOK_H__
#include "Base_Hook.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
class OpenGL_Hook : public Base_Hook
{
@ -38,5 +38,5 @@ public:
static void Create(); // Initialize OGL Hook.
};
#endif//STEAM_WIN32
#endif//NO_OVERLAY
#endif//__INCLUDED_OPENGL_HOOK_H__

View file

@ -1,6 +1,6 @@
#include "steam_overlay.h"
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
#include <thread>
#include <string>
@ -561,10 +561,4 @@ void Steam_Overlay::RunCallbacks()
}
}
#else
/* TODO:
* Add here the code for Linux overlay
*/
#endif

View file

@ -39,7 +39,7 @@ struct Friend_Less
}
};
#ifdef STEAM_WIN32
#ifndef NO_OVERLAY
class Steam_Overlay
{