Adding persistence flag to disable saving strength adjustments.
This commit is contained in:
parent
98f2e258c9
commit
991f7074cc
@ -52,6 +52,8 @@ ResetFFBStrength=
|
||||
; Step is the amount to adjust when increasing or decreasing per button where FFB strength is represented on
|
||||
; a scale of 0-100.
|
||||
StepFFBStrength=5
|
||||
; Set to 1 if you want FFB strength adjustments to persist between loads, else 0.
|
||||
EnableFFBStrengthPersistence=0
|
||||
; Set to 1 if you want FFB strength adjustments text to speech over speaker
|
||||
EnableFFBStrengthTextToSpeech=0
|
||||
|
||||
|
18
DllMain.cpp
18
DllMain.cpp
@ -929,6 +929,7 @@ int IncreaseFFBStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("IncreaseF
|
||||
int DecreaseFFBStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("DecreaseFFBStrength"), NULL, settingsFilename);
|
||||
int ResetFFBStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ResetFFBStrength"), NULL, settingsFilename);
|
||||
int StepFFBStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("StepFFBStrength"), 5, settingsFilename);
|
||||
int EnableFFBStrengthPersistence = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableFFBStrengthPersistence"), 0, settingsFilename);
|
||||
int EnableFFBStrengthTextToSpeech = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableFFBStrengthTextToSpeech"), 0, settingsFilename);
|
||||
|
||||
extern void DefaultConfigValues();
|
||||
@ -1948,14 +1949,17 @@ int WorkaroundToFixRumble(void* ptr)
|
||||
|
||||
void WritePersistentMaxForce()
|
||||
{
|
||||
if (AlternativeFFB == 1)
|
||||
if (EnableFFBStrengthPersistence == 1)
|
||||
{
|
||||
WritePrivateProfileStringA("Settings", CustomAlternativeMaxForceLeft, (char*)(std::to_string(configAlternativeMaxForceLeft)).c_str(), ".\\FFBPlugin.ini");
|
||||
WritePrivateProfileStringA("Settings", CustomAlternativeMaxForceRight, (char*)(std::to_string(configAlternativeMaxForceRight)).c_str(), ".\\FFBPlugin.ini");
|
||||
}
|
||||
else
|
||||
{
|
||||
WritePrivateProfileStringA("Settings", CustomMaxForce, (char*)(std::to_string(configMaxForce)).c_str(), ".\\FFBPlugin.ini");
|
||||
if (AlternativeFFB == 1)
|
||||
{
|
||||
WritePrivateProfileStringA("Settings", CustomAlternativeMaxForceLeft, (char*)(std::to_string(configAlternativeMaxForceLeft)).c_str(), ".\\FFBPlugin.ini");
|
||||
WritePrivateProfileStringA("Settings", CustomAlternativeMaxForceRight, (char*)(std::to_string(configAlternativeMaxForceRight)).c_str(), ".\\FFBPlugin.ini");
|
||||
}
|
||||
else
|
||||
{
|
||||
WritePrivateProfileStringA("Settings", CustomMaxForce, (char*)(std::to_string(configMaxForce)).c_str(), ".\\FFBPlugin.ini");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user