Merge pull request #101 from Boomslangnz/master
Tweak Output Blaster loading
This commit is contained in:
commit
b453533039
@ -18,7 +18,6 @@ void *__cdecl memcpy_0(void *a1, const void *a2, size_t a3)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool OutputInit = false;
|
|
||||||
static HMODULE blaster;
|
static HMODULE blaster;
|
||||||
|
|
||||||
// used in SR3 and Ford Racing
|
// used in SR3 and Ford Racing
|
||||||
@ -69,33 +68,20 @@ DWORD WINAPI QuitGameThread(__in LPVOID lpParameter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI OutputsThread(__in LPVOID lpParameter)
|
DWORD WINAPI OutputsThread(__in LPVOID lpParameter)
|
||||||
{
|
{
|
||||||
while (true)
|
blaster = LoadLibraryA("OutputBlaster.dll");
|
||||||
{
|
if (blaster)
|
||||||
if (GameDetect::currentGame == GameID::BG4 || GameDetect::currentGame == GameID::ChaseHq2 || GameDetect::currentGame == GameID::Daytona3 || GameDetect::currentGame == GameID::GTIClub3 || GameDetect::currentGame == GameID::MachStorm || GameDetect::currentGame == GameID::WackyRaces || GameDetect::currentGame == GameID::WMMT5)
|
{
|
||||||
{
|
printf("OutputBlaster loaded!");
|
||||||
if (ToBool(config["General"]["Enable Outputs"]))
|
}
|
||||||
{
|
else
|
||||||
if (!OutputInit)
|
{
|
||||||
{
|
printf("Failed to Load OutputBlaster!");
|
||||||
blaster = LoadLibraryA("OutputBlaster.dll");
|
}
|
||||||
if (blaster)
|
return 0;
|
||||||
{
|
}
|
||||||
printf("OutputBlaster loaded!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Failed to Load OutputBlaster!");
|
|
||||||
}
|
|
||||||
OutputInit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Sleep(300);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* WINDOW HOOKS */
|
/* WINDOW HOOKS */
|
||||||
|
|
||||||
DWORD g_windowStyle;
|
DWORD g_windowStyle;
|
||||||
@ -234,6 +220,9 @@ static InitFunction globalFunc([]()
|
|||||||
{
|
{
|
||||||
hook::pattern::InitializeHints();
|
hook::pattern::InitializeHints();
|
||||||
CreateThread(NULL, 0, QuitGameThread, NULL, 0, NULL);
|
CreateThread(NULL, 0, QuitGameThread, NULL, 0, NULL);
|
||||||
CreateThread(NULL, 0, OutputsThread, NULL, 0, NULL);
|
if (ToBool(config["General"]["Enable Outputs"]))
|
||||||
|
{
|
||||||
|
CreateThread(NULL, 0, OutputsThread, NULL, 0, NULL);
|
||||||
|
}
|
||||||
}, GameID::Global);
|
}, GameID::Global);
|
||||||
#pragma optimize("", on)
|
#pragma optimize("", on)
|
Loading…
Reference in New Issue
Block a user