Skip to content

Commit 729a01b

Browse files
committed
Loop should continue on invalid event in drm backend
1 parent c2c8b68 commit 729a01b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platforms/rcore_drm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ static void PollGamepadEvents(void)
15421542
{
15431543
if (event.type == EV_KEY)
15441544
{
1545-
if (event.code >= MAX_GAMEPAD_BUTTONS) return;
1545+
if (event.code >= MAX_GAMEPAD_BUTTONS) continue;
15461546

15471547
TRACELOG(LOG_DEBUG, "DRM: Gamepad %i button: %i, value: %i", i, event.code, event.value);
15481548

@@ -1554,7 +1554,7 @@ static void PollGamepadEvents(void)
15541554
}
15551555
else if (event.type == EV_ABS)
15561556
{
1557-
if (event.code >= MAX_GAMEPAD_AXIS) return;
1557+
if (event.code >= MAX_GAMEPAD_AXIS) continue;
15581558

15591559
TRACELOG(LOG_DEBUG, "DRM: Gamepad %i axis: %i, value: %i", i, platform.gamepadAbsAxisMap[i][event.code], event.value);
15601560

0 commit comments

Comments
 (0)