Skip to content

Commit

Permalink
Fixes: auto reconnect controllers disabled by default due to issues
Browse files Browse the repository at this point in the history
  • Loading branch information
r57zone committed Dec 25, 2022
1 parent 1b51fa1 commit 556e841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/DSAdvance/DSAdvance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,15 @@ void MainTextUpdate() {

int main(int argc, char **argv)
{
SetConsoleTitle("DSAdvance 0.8.2");
SetConsoleTitle("DSAdvance 0.8.3");
// Config parameters
CIniReader IniFile("Config.ini");

bool InvertLeftStickX = IniFile.ReadBoolean("Gamepad", "InvertLeftStickX", false);
bool InvertLeftStickY = IniFile.ReadBoolean("Gamepad", "InvertLeftStickY", false);
bool InvertRightStickX = IniFile.ReadBoolean("Gamepad", "InvertRightStickX", false);
bool InvertRightStickY = IniFile.ReadBoolean("Gamepad", "InvertRightStickY", false);
bool AutoReconnect = IniFile.ReadBoolean("Gamepad", "AutoReconnect", false);
int SleepTimeOut = IniFile.ReadInteger("Gamepad", "SleepTimeOut", 1);

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

if (ResetCounter >= ResetControllersTimeOut) ResetCounter = 0; else ResetCounter++; // Auto reconnect controllers & fix JoyShockLibrary bug with increase in CPU usage when the controller is turned off
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
//printf("%d \n", ResetCounter);

if (SkipPollCount > 0) SkipPollCount--;
Expand Down

0 comments on commit 556e841

Please sign in to comment.