1
0
mirror of synced 2025-02-17 10:58:36 +01:00

Revert "Fix FFB not working on certain games"

This reverts commit cfbe20d098f528dd16c996a8dd9f0af3b92a688b.
This commit is contained in:
Aaron M 2020-07-18 15:18:23 +12:00
parent cfbe20d098
commit 70103ece54

View File

@ -2059,17 +2059,8 @@ DWORD WINAPI AdjustFFBStrengthLoop(LPVOID lpParam)
}
}
DWORD WINAPI FFBLoop(LPVOID lpParam)
DWORD WINAPI FFBLoop2(LPVOID lpParam)
{
hlp.log("In FFBLoop");
SDL_HapticStopAll(haptic);
if (configGameId != 29) //For games which need code to run quicker etc. Some games will crash if no sleep added
{
Sleep(2500);
}
Initialize(0);
hlp.log("Initialize() complete");
if (EnableRumble == 1)
{
if ((configGameId != 1) && (configGameId != 9) && (configGameId != 12) && (configGameId != 26) && (configGameId != 28) && (configGameId != 29) && (configGameId != 30) && (configGameId != 31) && (configGameId != 35))
@ -2271,13 +2262,7 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
if (configDefaultFriction >= 0 && configDefaultFriction <= 100) {
TriggerFrictionEffectWithDefaultOption(configDefaultFriction / 100.0, true);
}
if (EnableFFBStrengthDynamicAdjustment == 1)
{
CreateThread(NULL, 0, AdjustFFBStrengthLoop, NULL, 0, NULL);
CustomFFBStrengthSetup();
}
hlp.log("Entering Game's FFBLoop loop");
bool* kr = (bool*)lpParam;
while (*kr)
@ -2292,6 +2277,28 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
return 0;
}
DWORD WINAPI FFBLoop(LPVOID lpParam)
{
hlp.log("In FFBLoop");
SDL_HapticStopAll(haptic);
CreateThread(NULL, 0, FFBLoop2, (LPVOID)&keepRunning, 0, NULL);
if (configGameId != 29) //For games which need code to run quicker etc. Some games will crash if no sleep added
{
Sleep(2500);
}
Initialize(0);
hlp.log("Initialize() complete");
if (EnableFFBStrengthDynamicAdjustment == 1)
{
Sleep(4000);
CreateThread(NULL, 0, AdjustFFBStrengthLoop, NULL, 0, NULL);
CustomFFBStrengthSetup();
}
return 0;
}
void CreateFFBLoopThread()
{
hlp.log("Before CreateThread");