1
0
mirror of synced 2024-11-14 23:07:36 +01:00

Merge pull request #53 from 00C0FFEE/GHA-fixes

GHA fixes
This commit is contained in:
Reaver 2019-06-27 20:00:31 +03:00 committed by GitHub
commit 11de966d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View File

@ -40,6 +40,9 @@ DWORD WINAPI InputRT6(LPVOID lpParam)
{
WinExec("taskkill /f /im GHA.exe", SW_HIDE);
}
//DEBUG//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//info(true, "test values *ffbOffset3=0x%02X / *ffbOffset4=0x%02X ", *ffbOffset3, *ffbOffset4);
//DEBUG//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
return 0;
}

View File

@ -82,9 +82,9 @@ DWORD WINAPI XInputGetState
if (GameDetect::currentGame == GameID::GHA)
{
gamepadState.wButtons |= *ffbOffset;
gamepadState.bLeftTrigger |= *ffbOffset3;
gamepadState.bRightTrigger |= *ffbOffset4;
gamepadState.wButtons = 0;
gamepadState.bLeftTrigger = 0;
gamepadState.bRightTrigger = 0;
// START KEY MACRO (only on ATTRACT SCREEN)
if (*ffbOffset == XINPUT_GAMEPAD_START)
{
@ -92,10 +92,28 @@ DWORD WINAPI XInputGetState
gamepadState.bLeftTrigger = 255;
gamepadState.bRightTrigger = 255;
}
// GREEN KEY MACRO
if (*ffbOffset == XINPUT_GAMEPAD_X)
{
gamepadState.bLeftTrigger = 255;
}
else gamepadState.bLeftTrigger = 0;
// BLUE KEY MACRO
if (*ffbOffset == XINPUT_GAMEPAD_Y)
{
gamepadState.bRightTrigger = 255;
}
else gamepadState.bRightTrigger = 0;
// OTHER KEYs PASSTHROUGH
if (*ffbOffset == XINPUT_GAMEPAD_DPAD_UP || *ffbOffset == XINPUT_GAMEPAD_DPAD_DOWN || *ffbOffset == XINPUT_GAMEPAD_DPAD_LEFT || *ffbOffset == XINPUT_GAMEPAD_DPAD_RIGHT || *ffbOffset == XINPUT_GAMEPAD_LEFT_SHOULDER || *ffbOffset == XINPUT_GAMEPAD_RIGHT_SHOULDER || *ffbOffset == XINPUT_GAMEPAD_A || *ffbOffset == XINPUT_GAMEPAD_B)
{
gamepadState.wButtons |= *ffbOffset;
}
else gamepadState.wButtons = 0;
}
else
{
gamepadState.wButtons |= 0;
gamepadState.wButtons = 0;
gamepadState.bLeftTrigger = 0;
gamepadState.bRightTrigger = 0;
}