From 93eb0df38aab9ebf1f71a4f27a53ba2039ed946d Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Fri, 6 Sep 2024 10:02:55 +0200 Subject: [PATCH] jinput: fix incorrect return value in new event() convention --- src/jinput.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jinput.c b/src/jinput.c index 1758b33..fb039c7 100644 --- a/src/jinput.c +++ b/src/jinput.c @@ -256,6 +256,7 @@ static bool jinput_poly_event(void *i0, jevent e) if(e.type == JWIDGET_KEY) { key_event_t ev = e.key; + bool handled = true; /* Releasing modifiers */ if(ev.type == KEYEV_UP && ev.key == KEY_SHIFT) { @@ -326,10 +327,12 @@ static bool jinput_poly_event(void *i0, jevent e) /* Remove modifiers otherwise */ else i->mode &= ~(JINPUT_SHIFT | JINPUT_ALPHA); } - else return false; + else handled = false; } i->widget.update = 1; + if(handled) + return true; } return jwidget_poly_event(i, e);