1
0
mirror of synced 2025-02-22 13:09:57 +01:00

Fix build if atlstr.h is missing

This commit is contained in:
Poliwrath 2021-08-19 13:34:30 -04:00
parent a1c6059ecd
commit 43cfbcba3a
7 changed files with 20 additions and 4 deletions

View File

@ -1,4 +1,5 @@
#include <StdInc.h>
#if __has_include(<atlstr.h>)
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Functions/Global.h"
#include "Utility\Hooking.Patterns.h"
@ -1072,3 +1073,4 @@ static InitFunction DirtyDrivinFunc([]()
}, GameID::DirtyDrivin);
#endif
#pragma optimize("", on)
#endif

View File

@ -1,3 +1,4 @@
#if __has_include(<atlstr.h>)
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Functions/Global.h"
@ -435,3 +436,4 @@ static InitFunction FNFSBFunc([]()
}
}, GameID::FNFSB);
#endif

View File

@ -1,4 +1,5 @@
#include <StdInc.h>
#if __has_include(<atlstr.h>)
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Functions/Global.h"
#include "Functions/GlobalRegHooks.h"
@ -512,3 +513,4 @@ static InitFunction GHAFunc([]()
}
}, GameID::GHA);
#endif

View File

@ -1,4 +1,5 @@
#include <StdInc.h>
#if __has_include(<atlstr.h>)
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Functions/Global.h"
#include "Utility\Hooking.Patterns.h"
@ -208,3 +209,4 @@ static InitFunction JLeagueFunc([]()
}, GameID::JLeague);
#endif
#endif

View File

@ -1,3 +1,4 @@
#if __has_include(<atlstr.h>)
#include <StdInc.h>
#include "Utility/InitFunction.h"
#include "Functions/Global.h"
@ -2118,3 +2119,4 @@ static InitFunction SFVFunc([]()
MH_EnableHook(MH_ALL_HOOKS);
}, GameID::SFV);
#endif
#endif

View File

@ -5,7 +5,9 @@
#include <objbase.h>
#include "Utility/GameDetect.h"
#include <string>
#if __has_include(<atlstr.h>)
#include <atlstr.h>
#endif
#include <windows.h>
LSTATUS(__stdcall *orig_RegOpenKeyExA)(
@ -188,6 +190,7 @@ LSTATUS __stdcall RegQueryValueExWGlobalWrap(
LPDWORD lpcbData
)
{
#if __has_include(<atlstr.h>)
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);
}

View File

@ -85,10 +85,12 @@ DWORD WINAPI XInputGetState
{
gamepadState.wButtons = *ffbOffset;
}
#if __has_include(<atlstr.h>)
else if (GameDetect::currentGame == GameID::GHA)
{
GHAInputs();
}
#endif
else if (GameDetect::currentGame == GameID::JLeague)
{
gamepadState.wButtons = 0;