Skip to content

Commit b1d1a82

Browse files
committed
Fix implementation of dead zone
1 parent 52d7e36 commit b1d1a82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/eventthread.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ void EventThread::process(RGSSThreadData &rtData)
440440
case SDL_CONTROLLERAXISMOTION:
441441
if(std::abs(event.caxis.value) > rtData.config.axisDeadzone[event.caxis.axis] * 32767)
442442
controllerState.axes[event.caxis.axis] = event.caxis.value;
443+
else
444+
controllerState.axes[event.caxis.axis] = 0;
443445
// Take deadzone into account when storing last input
444446
// This is based on percentage, so multiply by the max value
445447
if(std::abs(event.caxis.value) > rtData.config.axisDeadzone[event.caxis.axis] * 32767) {

0 commit comments

Comments
 (0)