diff --git a/OpenParrot/src/Functions/Games/Other/DirtyDrivin.cpp b/OpenParrot/src/Functions/Games/Other/DirtyDrivin.cpp index eac17ae..44285be 100644 --- a/OpenParrot/src/Functions/Games/Other/DirtyDrivin.cpp +++ b/OpenParrot/src/Functions/Games/Other/DirtyDrivin.cpp @@ -1,4 +1,5 @@ -#include +#if __has_include() +#include #include "Utility/InitFunction.h" #include "Functions/Global.h" #include "Utility\Hooking.Patterns.h" @@ -1071,4 +1072,5 @@ static InitFunction DirtyDrivinFunc([]() }, GameID::DirtyDrivin); #endif -#pragma optimize("", on) \ No newline at end of file +#pragma optimize("", on) +#endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/Games/Other/FNFSB.cpp b/OpenParrot/src/Functions/Games/Other/FNFSB.cpp index 2be0207..ecc8165 100644 --- a/OpenParrot/src/Functions/Games/Other/FNFSB.cpp +++ b/OpenParrot/src/Functions/Games/Other/FNFSB.cpp @@ -1,3 +1,4 @@ +#if __has_include() #include #include "Utility/InitFunction.h" #include "Functions/Global.h" @@ -435,3 +436,4 @@ static InitFunction FNFSBFunc([]() } }, GameID::FNFSB); +#endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/Games/Other/GHA.cpp b/OpenParrot/src/Functions/Games/Other/GHA.cpp index 01fea59..db477bf 100644 --- a/OpenParrot/src/Functions/Games/Other/GHA.cpp +++ b/OpenParrot/src/Functions/Games/Other/GHA.cpp @@ -1,4 +1,5 @@ -#include +#if __has_include() +#include #include "Utility/InitFunction.h" #include "Functions/Global.h" #include "Functions/GlobalRegHooks.h" @@ -512,3 +513,4 @@ static InitFunction GHAFunc([]() } }, GameID::GHA); +#endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/Games/Other/JusticeLeague.cpp b/OpenParrot/src/Functions/Games/Other/JusticeLeague.cpp index 83de667..10261e7 100644 --- a/OpenParrot/src/Functions/Games/Other/JusticeLeague.cpp +++ b/OpenParrot/src/Functions/Games/Other/JusticeLeague.cpp @@ -1,4 +1,5 @@ -#include +#if __has_include() +#include #include "Utility/InitFunction.h" #include "Functions/Global.h" #include "Utility\Hooking.Patterns.h" @@ -207,4 +208,5 @@ static InitFunction JLeagueFunc([]() } }, GameID::JLeague); +#endif #endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/Games/TypeX4/SFV.cpp b/OpenParrot/src/Functions/Games/TypeX4/SFV.cpp index d112ca7..ec3c435 100644 --- a/OpenParrot/src/Functions/Games/TypeX4/SFV.cpp +++ b/OpenParrot/src/Functions/Games/TypeX4/SFV.cpp @@ -1,3 +1,4 @@ +#if __has_include() #include #include "Utility/InitFunction.h" #include "Functions/Global.h" @@ -2117,4 +2118,5 @@ static InitFunction SFVFunc([]() MH_CreateHookApi(L"xinput1_3.dll", "XInputGetState", &XInputGetStateSFV, NULL); MH_EnableHook(MH_ALL_HOOKS); }, GameID::SFV); +#endif #endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/GlobalRegHooks.cpp b/OpenParrot/src/Functions/GlobalRegHooks.cpp index ac18fe6..66590dd 100644 --- a/OpenParrot/src/Functions/GlobalRegHooks.cpp +++ b/OpenParrot/src/Functions/GlobalRegHooks.cpp @@ -5,7 +5,9 @@ #include #include "Utility/GameDetect.h" #include +#if __has_include() #include +#endif #include LSTATUS(__stdcall *orig_RegOpenKeyExA)( @@ -188,6 +190,7 @@ LSTATUS __stdcall RegQueryValueExWGlobalWrap( LPDWORD lpcbData ) { +#if __has_include() if (GameDetect::currentGame == GameID::GHA) { if (_wcsicmp(lpValueName, L"Language") == 0) @@ -210,6 +213,7 @@ LSTATUS __stdcall RegQueryValueExWGlobalWrap( return ERROR_SUCCESS; } } +#endif return orig_RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData); } diff --git a/OpenParrot/src/Functions/XInputEmu.cpp b/OpenParrot/src/Functions/XInputEmu.cpp index c8f9963..6eb7f20 100644 --- a/OpenParrot/src/Functions/XInputEmu.cpp +++ b/OpenParrot/src/Functions/XInputEmu.cpp @@ -85,10 +85,12 @@ DWORD WINAPI XInputGetState { gamepadState.wButtons = *ffbOffset; } +#if __has_include() else if (GameDetect::currentGame == GameID::GHA) { GHAInputs(); } +#endif else if (GameDetect::currentGame == GameID::JLeague) { gamepadState.wButtons = 0;