Skip to content

Commit 556e841

Browse files
committed
Fixes: auto reconnect controllers disabled by default due to issues
1 parent 1b51fa1 commit 556e841

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/DSAdvance/DSAdvance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,15 @@ void MainTextUpdate() {
438438

439439
int main(int argc, char **argv)
440440
{
441-
SetConsoleTitle("DSAdvance 0.8.2");
441+
SetConsoleTitle("DSAdvance 0.8.3");
442442
// Config parameters
443443
CIniReader IniFile("Config.ini");
444444

445445
bool InvertLeftStickX = IniFile.ReadBoolean("Gamepad", "InvertLeftStickX", false);
446446
bool InvertLeftStickY = IniFile.ReadBoolean("Gamepad", "InvertLeftStickY", false);
447447
bool InvertRightStickX = IniFile.ReadBoolean("Gamepad", "InvertRightStickX", false);
448448
bool InvertRightStickY = IniFile.ReadBoolean("Gamepad", "InvertRightStickY", false);
449+
bool AutoReconnect = IniFile.ReadBoolean("Gamepad", "AutoReconnect", false);
449450
int SleepTimeOut = IniFile.ReadInteger("Gamepad", "SleepTimeOut", 1);
450451

451452
float DeadZoneLeftStickX = IniFile.ReadFloat("Gamepad", "DeadZoneLeftStickX", 0);
@@ -905,7 +906,7 @@ int main(int argc, char **argv)
905906
// Battery level display
906907
if (BackOutStateCounter > 0) { if (BackOutStateCounter == 1) { GamepadOutState.PlayersCount = 0; GamepadSetState(GamepadOutState); AppStatus.ShowBatteryStatus = false; MainTextUpdate(); } BackOutStateCounter--; }
907908

908-
if (ResetCounter >= ResetControllersTimeOut) ResetCounter = 0; else ResetCounter++; // Auto reconnect controllers & fix JoyShockLibrary bug with increase in CPU usage when the controller is turned off
909+
if (AutoReconnect) { if (ResetCounter >= ResetControllersTimeOut) ResetCounter = 0; else ResetCounter++; } // Auto reconnect controllers & fix JoyShockLibrary bug with increase in CPU usage when the controller is turned off
909910
//printf("%d \n", ResetCounter);
910911

911912
if (SkipPollCount > 0) SkipPollCount--;

0 commit comments

Comments
 (0)