From 56ecd62f58f0c988c017050a75c46953a30a7512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 3 Oct 2017 00:41:55 +0200 Subject: [PATCH] Fix joystick test hat drawing --- tests/joysticks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);