Skip to content

Commit b39a437

Browse files
committed
Report pedal change on disconnect
Now that pedal data is only sent via joystick when the pedals change position, it's important to note when we forcefully zero them due to a disconnect event. This fixes a bug where the pedals would remain stuck at their previous values whenever the connection was unplugged.
1 parent b02d798 commit b39a437

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/SimRacing.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ bool Pedals::update() {
361361
const int min = pedalData[i].getMin();
362362
pedalData[i].setPosition(min);
363363
}
364+
changed = true; // set flag so we know everything moved to 0
364365
}
365366

366367
return changed;

0 commit comments

Comments
 (0)