diff --git a/overlay_experimental/Base_Hook.cpp b/overlay_experimental/Base_Hook.cpp index d0da9074..4c983108 100644 --- a/overlay_experimental/Base_Hook.cpp +++ b/overlay_experimental/Base_Hook.cpp @@ -1,5 +1,7 @@ #include "Base_Hook.h" +#ifndef NO_OVERLAY + #include #include "Hook_Manager.h" @@ -38,4 +40,6 @@ void Base_Hook::HookFunc(std::pair hook) { if( DetourAttach(hook.first, hook.second) == 0 ) _hooked_funcs.emplace_back(hook); -} \ No newline at end of file +} + +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/Base_Hook.h b/overlay_experimental/Base_Hook.h index e00404ec..47a04cd1 100644 --- a/overlay_experimental/Base_Hook.h +++ b/overlay_experimental/Base_Hook.h @@ -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__ \ No newline at end of file diff --git a/overlay_experimental/DX10_Hook.cpp b/overlay_experimental/DX10_Hook.cpp index f065455b..103079ce 100644 --- a/overlay_experimental/DX10_Hook.cpp +++ b/overlay_experimental/DX10_Hook.cpp @@ -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 \ No newline at end of file +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/DX10_Hook.h b/overlay_experimental/DX10_Hook.h index a713287c..ffcbca60 100644 --- a/overlay_experimental/DX10_Hook.h +++ b/overlay_experimental/DX10_Hook.h @@ -2,7 +2,7 @@ #define __INCLUDED_DX10_HOOK_H__ #include "Base_Hook.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #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__ \ No newline at end of file diff --git a/overlay_experimental/DX11_Hook.cpp b/overlay_experimental/DX11_Hook.cpp index 782d0076..3541d309 100644 --- a/overlay_experimental/DX11_Hook.cpp +++ b/overlay_experimental/DX11_Hook.cpp @@ -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 \ No newline at end of file +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/DX11_Hook.h b/overlay_experimental/DX11_Hook.h index be045027..838c51f7 100644 --- a/overlay_experimental/DX11_Hook.h +++ b/overlay_experimental/DX11_Hook.h @@ -2,7 +2,7 @@ #define __INCLUDED_DX11_HOOK_H__ #include "Base_Hook.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #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__ \ No newline at end of file diff --git a/overlay_experimental/DX12_Hook.cpp b/overlay_experimental/DX12_Hook.cpp index 799f334c..5e117d36 100644 --- a/overlay_experimental/DX12_Hook.cpp +++ b/overlay_experimental/DX12_Hook.cpp @@ -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 \ No newline at end of file +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/DX12_Hook.h b/overlay_experimental/DX12_Hook.h index c01acd52..e89d90c3 100644 --- a/overlay_experimental/DX12_Hook.h +++ b/overlay_experimental/DX12_Hook.h @@ -2,7 +2,7 @@ #define __INCLUDED_DX12_HOOK_H__ #include "Base_Hook.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #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__ \ No newline at end of file diff --git a/overlay_experimental/DX9_Hook.cpp b/overlay_experimental/DX9_Hook.cpp index 0affc7fc..2d8dbf96 100644 --- a/overlay_experimental/DX9_Hook.cpp +++ b/overlay_experimental/DX9_Hook.cpp @@ -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 \ No newline at end of file +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/DX9_Hook.h b/overlay_experimental/DX9_Hook.h index 69470d11..86678aaa 100644 --- a/overlay_experimental/DX9_Hook.h +++ b/overlay_experimental/DX9_Hook.h @@ -2,7 +2,7 @@ #define __INCLUDED_DX9_HOOK_H__ #include "Base_Hook.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #include "DirectX_VTables.h" @@ -49,6 +49,6 @@ public: void loadFunctions(IDirect3DDevice9Ex *pDeviceEx); }; -#endif//STEAM_WIN32 +#endif//NO_OVERLAY #endif//__INCLUDED_DX9_HOOK_H__ \ No newline at end of file diff --git a/overlay_experimental/Hook_Manager.cpp b/overlay_experimental/Hook_Manager.cpp index 32812a4d..16f2d013 100644 --- a/overlay_experimental/Hook_Manager.cpp +++ b/overlay_experimental/Hook_Manager.cpp @@ -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); -} \ No newline at end of file +} + +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/Hook_Manager.h b/overlay_experimental/Hook_Manager.h index 5a600afc..529b8288 100644 --- a/overlay_experimental/Hook_Manager.h +++ b/overlay_experimental/Hook_Manager.h @@ -3,7 +3,7 @@ #include "Base_Hook.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #include @@ -45,6 +45,6 @@ public: Steam_Overlay* GetOverlay() const { return overlay; } }; -#endif//STEAM_WIN32 +#endif//NO_OVERLAY #endif//__INCLUDED_HOOK_BASE_H__ \ No newline at end of file diff --git a/overlay_experimental/OpenGL_Hook.cpp b/overlay_experimental/OpenGL_Hook.cpp index 368a07f7..ff77a354 100644 --- a/overlay_experimental/OpenGL_Hook.cpp +++ b/overlay_experimental/OpenGL_Hook.cpp @@ -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 \ No newline at end of file +#endif//NO_OVERLAY \ No newline at end of file diff --git a/overlay_experimental/OpenGL_Hook.h b/overlay_experimental/OpenGL_Hook.h index b32cf882..975cf921 100644 --- a/overlay_experimental/OpenGL_Hook.h +++ b/overlay_experimental/OpenGL_Hook.h @@ -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__ \ No newline at end of file diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index 723e4a22..f0e42aff 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -1,6 +1,6 @@ #include "steam_overlay.h" -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY #include #include @@ -561,10 +561,4 @@ void Steam_Overlay::RunCallbacks() } } -#else - -/* TODO: - * Add here the code for Linux overlay - */ - #endif \ No newline at end of file diff --git a/overlay_experimental/steam_overlay.h b/overlay_experimental/steam_overlay.h index 0f950319..4a6bf223 100644 --- a/overlay_experimental/steam_overlay.h +++ b/overlay_experimental/steam_overlay.h @@ -39,7 +39,7 @@ struct Friend_Less } }; -#ifdef STEAM_WIN32 +#ifndef NO_OVERLAY class Steam_Overlay {