diff --git a/dll/base.h b/dll/base.h index 4b3453e..82b6a38 100644 --- a/dll/base.h +++ b/dll/base.h @@ -18,6 +18,20 @@ #ifndef BASE_INCLUDE #define BASE_INCLUDE +#if defined(WIN64) || defined(_WIN64) || defined(__MINGW64__) + #define __WINDOWS_64__ +#elif defined(WIN32) || defined(_WIN32) || defined(__MINGW32__) + #define __WINDOWS_32__ +#endif + +#if defined(__WINDOWS_32__) || defined(__WINDOWS_64__) + #define __WINDOWS__ +#endif + +#if defined(__linux__) || defined(linux) + #define __LINUX__ +#endif + #if defined(WIN32) || defined(_WIN32) #define STEAM_WIN32 #pragma warning( disable : 4716) @@ -205,7 +219,7 @@ public: if (it != cr.callbacks.end()) { cr.callbacks.erase(it); } - + if (cr.callbacks.size() == 0) { cr.to_delete = true; } diff --git a/overlay_experimental/Windows_Hook.h b/overlay_experimental/Windows_Hook.h index 24e3156..5fd6d47 100644 --- a/overlay_experimental/Windows_Hook.h +++ b/overlay_experimental/Windows_Hook.h @@ -2,11 +2,9 @@ #define __INCLUDED_WINDOWS_HOOK_H__ #include "Base_Hook.h" -#ifndef NO_OVERLAY -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#include +#ifdef __WINDOWS__ +#ifndef NO_OVERLAY class Windows_Hook : public Base_Hook { @@ -48,4 +46,5 @@ public: }; #endif//NO_OVERLAY -#endif//__INCLUDED_WINDOWS_HOOK_H__ \ No newline at end of file +#endif//__WINDOWS__ +#endif//__INCLUDED_WINDOWS_HOOK_H__