Fixed #147 with wrong allegro text input handling

This commit is contained in:
vurtun 2016-05-21 18:41:33 +02:00
parent 2e975a3bd8
commit 6577d671d4

View File

@ -289,7 +289,7 @@ nk_allegro_handle_event(ALLEGRO_EVENT *evt)
} else if (evt->type == ALLEGRO_EVENT_KEY_CHAR) { } else if (evt->type == ALLEGRO_EVENT_KEY_CHAR) {
/* text input */ /* text input */
if (evt->keyboard.display == allegro.win) if (evt->keyboard.display == allegro.win)
if (evt->keyboard.unichar > 0 && evt->keyboard.unichar < 0x10000) if (evt->keyboard.unichar > 32 && evt->keyboard.unichar < 0x10000)
nk_input_unicode(ctx, (nk_rune)evt->keyboard.unichar); nk_input_unicode(ctx, (nk_rune)evt->keyboard.unichar);
} }
} }