1
0
mirror of synced 2025-02-01 12:17:55 +01:00

fixing up my daytona 3 and pokken stuff

This commit is contained in:
Boomslangnz 2018-11-03 16:12:53 +13:00
parent 2e85d92d50
commit 3dcd940a7a
2 changed files with 334 additions and 385 deletions

View File

@ -41,16 +41,11 @@ static void InjectKeys()
if (track != 0)
{
BYTE track1 = *(BYTE *)(track + 0x4);
<<<<<<< HEAD
=======
#ifdef _DEBUG
info(true, "%02X %02X", track1, gamestate);
#endif
if ((track1 == 2 || track1 == 4) && (gamestate == 0x16))
>>>>>>> c000b7c7ca96e0804e4505624bbd470887a189d8
{
info(true, "%02X %02X", track1, gamestate);
if ((track1 == 2 || track1 == 4) && (gamestate == 0x16))
{
BYTE reverse = wheel * 0xFF;
@ -58,16 +53,6 @@ static void InjectKeys()
*(BYTE *)(imageBase + 0x15B4678) = 0xFF;
else
*(BYTE *)(imageBase + 0x15B4678) = reverse;
info(true, "Reverse wheel");
}
else
<<<<<<< HEAD
{
*(BYTE *)(imageBase + 0x15B4678) = wheel;
info(true, "Normal wheel1");
}
=======
*(BYTE *)(imageBase + 0x15B4678) = reverse;
#ifdef _DEBUG
info(true, "Reverse wheel");
#endif
@ -78,7 +63,6 @@ static void InjectKeys()
#ifdef _DEBUG
info(true, "Normal wheel1");
#endif
>>>>>>> c000b7c7ca96e0804e4505624bbd470887a189d8
}
}
else
@ -88,8 +72,7 @@ static void InjectKeys()
info(true, "Normal wheel2");
#endif
}
}
if (wheel <= 0x40)
{

View File

@ -326,7 +326,6 @@ __in XINPUT_VIBRATION_EX* pVibration // The vibration information to send to
}
}
<<<<<<< HEAD
LPCWSTR libName = L"xinput1_3.dll";
LPCWSTR daytonalibName = L"xinput9_1_0.dll";
LPCWSTR ptrToUse;
@ -358,36 +357,3 @@ static InitFunction XInputHook([]()
}
});
#pragma optimize("", on)´
=======
LPCWSTR libName = L"xinput1_3.dll";
LPCWSTR daytonalibName = L"xinput9_1_0.dll";
LPCWSTR ptrToUse;
static InitFunction XInputHook([]()
{
if (GameDetect::currentGame == GameID::PokkenTournament || GameDetect::currentGame == GameID::SchoolOfRagnarok || GameDetect::currentGame == GameID::Daytona3)
{
controllerInit = true;
MH_Initialize();
if (GameDetect::currentGame == GameID::Daytona3)
ptrToUse = daytonalibName;
else
ptrToUse = libName;
MH_CreateHookApi(ptrToUse, "XInputGetState", &XInputGetState, NULL);
MH_CreateHookApi(ptrToUse, "XInputSetState", &XInputSetState, NULL);
MH_CreateHookApi(ptrToUse, "XInputGetCapabilities", &XInputGetCapabilities, NULL);
MH_CreateHookApi(ptrToUse, "XInputEnable", &XInputEnable, NULL);
MH_CreateHookApi(ptrToUse, "XInputGetDSoundAudioDeviceGuids", &XInputGetDSoundAudioDeviceGuids, NULL);
MH_CreateHookApi(ptrToUse, "XInputGetBatteryInformation", &XInputGetBatteryInformation, NULL);
MH_CreateHookApi(ptrToUse, "XInputGetKeystroke", &XInputGetKeystroke, NULL);
MH_CreateHookApi(ptrToUse, "XInputGetStateEx", &XInputGetStateEx, NULL);
MH_CreateHookApi(ptrToUse, "XInputSetStateEx", &XInputSetStateEx, NULL);
MH_EnableHook(MH_ALL_HOOKS);
}
});
#pragma optimize("", on)
>>>>>>> c000b7c7ca96e0804e4505624bbd470887a189d8