Added FFBMode to be used global if enabled
This commit is contained in:
parent
648e97f891
commit
726b2ae87c
@ -850,6 +850,7 @@ wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||
int configMinForce = GetPrivateProfileInt(TEXT("Settings"), TEXT("MinForce"), 0, settingsFilename);
|
||||
int configMaxForce = GetPrivateProfileInt(TEXT("Settings"), TEXT("MaxForce"), 100, settingsFilename);
|
||||
int enableLogging = GetPrivateProfileInt(TEXT("Settings"), TEXT("Logging"), 0, settingsFilename);
|
||||
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||
int EnableRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableRumble"), 0, settingsFilename);
|
||||
int ReverseRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("ReverseRumble"), 0, settingsFilename);
|
||||
wchar_t* deviceGUIDString = new wchar_t[256];
|
||||
@ -1106,6 +1107,11 @@ void TriggerConstantEffect(int direction, double strength)
|
||||
}
|
||||
}
|
||||
|
||||
if (FFBMode == 1)
|
||||
{
|
||||
strength = pow(strength, 0.5);
|
||||
}
|
||||
|
||||
SHORT MinForce = (SHORT)(strength > 0.001 ? (confMinForce / 100.0 * 32767.0) : 0);
|
||||
SHORT MaxForce = (SHORT)(confMaxForce / 100.0 * 32767.0);
|
||||
SHORT range = MaxForce - MinForce;
|
||||
|
Loading…
x
Reference in New Issue
Block a user