Browse Source

Fix joystick test hat drawing

Camilla Löwy 8 years ago
parent
commit
56ecd62f58
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/joysticks.c

+ 1 - 1
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);