Skip to content

Commit eed47ce

Browse files
committed
ControllerHotPlug: check setting before running our code
1 parent 57d237c commit eed47ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks_framerate.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ class ReplaceGameUpdateLoop : public Hook
132132
if (Settings::VibrationMode != 0 && CurGameState != GameState::STATE_GAME)
133133
SetVibration(Settings::VibrationControllerId, 0.0f, 0.0f);
134134

135-
DInput_RegisterNewDevices();
135+
if (Settings::ControllerHotPlug)
136+
DInput_RegisterNewDevices();
136137
}
137138

138139
for (int curUpdateIdx = 0; curUpdateIdx < numUpdates; curUpdateIdx++)

0 commit comments

Comments
 (0)