Skip to content

Commit 1b6fd1b

Browse files
committed
Fix for features notification request
1 parent 510f7ca commit 1b6fd1b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/src/streaming/InputManager.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,21 +253,21 @@ void MoonlightInputManager::handleControllers(bool specialKey) {
253253

254254
short mappedControllersCount = controllersToMap();
255255

256-
if (lastControllerCount != controllersCount) {
257-
lastControllerCount = controllersCount;
258-
259-
for (int i = 0; i < controllersCount; i++) {
260-
Logger::debug("StreamingView: send features message for controller #{}", i);
261-
LiSendControllerArrivalEvent(i, mappedControllersCount, LI_CTYPE_UNKNOWN, 0, LI_CCAP_RUMBLE | LI_CCAP_ACCEL | LI_CCAP_GYRO);
262-
}
263-
}
264-
265256
for (int i = 0; i < controllersCount; i++) {
266257
GamepadState gamepadState = getControllerState(i, specialKey);
267258

268259
if (!gamepadState.is_equal(lastGamepadStates[i])) {
269260
lastGamepadStates[i] = gamepadState;
270261

262+
if (lastControllerCount != controllersCount) {
263+
lastControllerCount = controllersCount;
264+
265+
for (int i = 0; i < controllersCount; i++) {
266+
Logger::debug("StreamingView: send features message for controller #{}", i);
267+
LiSendControllerArrivalEvent(i, mappedControllersCount, LI_CTYPE_UNKNOWN, 0, LI_CCAP_RUMBLE | LI_CCAP_ACCEL | LI_CCAP_GYRO);
268+
}
269+
}
270+
271271
if (LiSendMultiControllerEvent(
272272
i, mappedControllersCount, gamepadState.buttonFlags,
273273
gamepadState.leftTrigger, gamepadState.rightTrigger,

0 commit comments

Comments
 (0)