From 55b96f61e37b0c7ce7f6f8e6c0fdf230ab780166 Mon Sep 17 00:00:00 2001 From: Boomslangnz Date: Sun, 27 Aug 2023 19:56:37 +1200 Subject: [PATCH] Spring Changes --- AutoSetup.cmd | 2 ++ Config/FFBPlugin.ini | 11 ++++++++++- DInput8Wrapper.aps | Bin 2740 -> 2740 bytes DInput8Wrapper.rc | Bin 5212 -> 5212 bytes DllMain.cpp | 17 +++++++++++++++-- Version.txt | 2 +- 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/AutoSetup.cmd b/AutoSetup.cmd index 524dea8..4cb9010 100644 --- a/AutoSetup.cmd +++ b/AutoSetup.cmd @@ -16,6 +16,8 @@ xcopy ".\Release.x64\dinput8.dll" ".\Release.Win32\PokkenTournament" /Y xcopy ".\Release.x64\SDL2.dll" ".\Release.Win32\PokkenTournament" /Y xcopy ".\Release.x64\dinput8.dll" ".\Release.Win32\Supermodel 64bit Outputs" /Y xcopy ".\Release.x64\SDL2.dll" ".\Release.Win32\Supermodel 64bit Outputs" /Y +xcopy ".\Release.x64\dinput8.dll" ".\Release.Win32\Spring Effect 64bit" /Y +xcopy ".\Release.x64\SDL2.dll" ".\Release.Win32\Spring Effect 64bit" /Y xcopy ".\Release.x64\dinput8.dll" ".\Release.Win32\Flycast" /Y xcopy ".\Release.x64\SDL2.dll" ".\Release.Win32\Flycast" /Y xcopy ".\Release.x64\dinput8.dll" ".\Release.Win32\WMMT5" /Y diff --git a/Config/FFBPlugin.ini b/Config/FFBPlugin.ini index aad71a3..570bc5f 100644 --- a/Config/FFBPlugin.ini +++ b/Config/FFBPlugin.ini @@ -121,11 +121,20 @@ EnableDamper=0 DamperStrength=100 FFBOrRumble=0 -[Spring Effect] +[Spring Effect 32bit] GameId=74 FeedbackLength=500 EnableDamper=0 DamperStrength=100 +SpringEnable=1 +SpringStrength=100 + +[Spring Effect 64bit] +GameId=74 +FeedbackLength=500 +EnableDamper=0 +DamperStrength=100 +SpringEnable=1 SpringStrength=100 [GRID Real] diff --git a/DInput8Wrapper.aps b/DInput8Wrapper.aps index 6b80156af1dc5470a8fc0b3128139e9497410b3f..130784df3bca4dd72438de4fab16a37a1dcd0b61 100644 GIT binary patch delta 36 ncmdlYx&8+0|+oNC~i(=Q)FZ`-rUZv4Wc%4FfsuEkyr&8c0|+oNC~Qt;Q)FZ`+T6~r4Wc%4FfsuEkrfAY diff --git a/DInput8Wrapper.rc b/DInput8Wrapper.rc index c64b9f3f1a76da17775d432fdeb035d28df6cec7..804722e4d9a3a0319b936174a01dd371cedf9073 100644 GIT binary patch delta 38 rcmcbkaYtiA7&oKw&0@^G9@Tv&0@^G9@LdZr diff --git a/DllMain.cpp b/DllMain.cpp index b09fe3f..f6654b0 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -1811,8 +1811,21 @@ void TriggerSpringEffectInfinite(double strength) tempEffect.condition.direction.dir[0] = 1; tempEffect.constant.direction.dir[1] = 1; //Y Position - SHORT minForce = (SHORT)(strength > 0.001 ? (configMinForce / 100.0 * 32767.0) : 0); // strength is a double so we do an epsilon check of 0.001 instead of > 0. - SHORT maxForce = (SHORT)(configMaxForce / 100.0 * 32767.0); + SHORT minForce; + SHORT maxForce; + + if (EnableForceSpringEffect) + { + minForce = (SHORT)(0); // strength is a double so we do an epsilon check of 0.001 instead of > 0. + maxForce = (SHORT)(ForceSpringStrength / 100.0 * 32767.0); + + } + else + { + minForce = (SHORT)(strength > 0.001 ? (configMinForce / 100.0 * 32767.0) : 0); // strength is a double so we do an epsilon check of 0.001 instead of > 0. + maxForce = (SHORT)(configMaxForce / 100.0 * 32767.0); + } + SHORT range = maxForce - minForce; SHORT coeff = (SHORT)(strength * range + minForce); diff --git a/Version.txt b/Version.txt index f219961..5a687ed 100644 --- a/Version.txt +++ b/Version.txt @@ -1 +1 @@ -v2.0.0.32 \ No newline at end of file +v2.0.0.33 \ No newline at end of file