Skip to content

Commit

Permalink
Spring Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Boomslangnz committed Aug 27, 2023
1 parent 363341b commit 55b96f6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
2 changes: 2 additions & 0 deletions AutoSetup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion Config/FFBPlugin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Binary file modified DInput8Wrapper.aps
Binary file not shown.
Binary file modified DInput8Wrapper.rc
Binary file not shown.
17 changes: 15 additions & 2 deletions DllMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0.32
v2.0.0.33

0 comments on commit 55b96f6

Please sign in to comment.