Skip to content

Commit

Permalink
Fix Default.EnableVibration INI value being overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Jul 8, 2020
1 parent 60cddbf commit 3b5f442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Xb2XInput/XboxController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ UserSettings XboxController::LoadSettings(const std::string& ini_key, bool use_d
defaultVal = use_defaults ? defaults_.vibration_enabled : false;
ret.vibration_enabled = GetSettingBool("EnableVibration", defaultVal, ini_key);

if (ret.vibration_enabled) // write setting to ini if this == default, in case it didn't already exist
if (ret.vibration_enabled == defaultVal) // write setting to ini if this == default, in case it didn't already exist
SetSetting("EnableVibration", defaultVal ? "true" : "false", ini_key); // write setting to ini if this == default, in case it didn't already exist

ret.deadzone.sThumbL = min(max(GetSettingInt("DeadzoneLeftStick", use_defaults ? defaults_.deadzone.sThumbL : 0, ini_key), 0), SHRT_MAX);
Expand Down

0 comments on commit 3b5f442

Please sign in to comment.