diff --git a/tests/joysticks.c b/tests/joysticks.c index d039a761..d2be6475 100644 --- a/tests/joysticks.c +++ b/tests/joysticks.c @@ -98,7 +98,7 @@ static void hat_widget(struct nk_context* nk, unsigned char state) struct nk_rect area; struct nk_vec2 center; - if (nk_widget(&area, nk) != NK_WIDGET_VALID) + if (nk_widget(&area, nk) == NK_WIDGET_INVALID) return; center = nk_vec2(area.x + area.w / 2.f, area.y + area.h / 2.f);