1
0
mirror of synced 2025-01-20 17:48:51 +01:00

Added Disable Rumble toggle

as requested when user using joystick and xinput controller still rumbles if connected
This commit is contained in:
Aaron M 2019-11-19 18:17:46 +13:00
parent 5c3a25be0a
commit 5bae946aff

View File

@ -5,7 +5,7 @@
#include "Functions/Global.h"
#include "Utility/GameDetect.h"
DWORD WINAPI XInputGetStateStarWars
DWORD WINAPI XInputStateStarWars
(
__in DWORD dwUserIndex, // Index of the gamer associated with the device
__out DWORD* pState // Receives the current state
@ -227,7 +227,11 @@ static InitFunction StarWarsJapEs3XFunc([]()
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_encrypt", Hook_hasp_encrypt, NULL);
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_logout", Hook_hasp_logout, NULL);
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_login", Hook_hasp_login, NULL);
MH_CreateHookApi(L"xinput1_3.dll", "XInputGetState", &XInputGetStateStarWars, NULL);
MH_CreateHookApi(L"xinput1_3.dll", "XInputGetState", &XInputStateStarWars, NULL);
if (ToBool(config["General"]["Disable Rumble"]))
{
MH_CreateHookApi(L"xinput1_3.dll", "XInputSetState", &XInputStateStarWars, NULL);
}
MH_EnableHook(MH_ALL_HOOKS);
if (ToBool(config["General"]["Remove Camera Error"]))
@ -253,7 +257,11 @@ static InitFunction StarWarsEs3XFunc([]()
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_encrypt", Hook_hasp_encrypt, NULL);
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_logout", Hook_hasp_logout, NULL);
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_login", Hook_hasp_login, NULL);
MH_CreateHookApi(L"xinput1_3.dll", "XInputGetState", &XInputGetStateStarWars, NULL);
MH_CreateHookApi(L"xinput1_3.dll", "XInputGetState", &XInputStateStarWars, NULL);
if (ToBool(config["General"]["Disable Rumble"]))
{
MH_CreateHookApi(L"xinput1_3.dll", "XInputSetState", &XInputStateStarWars, NULL);
}
MH_EnableHook(MH_ALL_HOOKS);
if (ToBool(config["General"]["2D DomeFix"]))