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
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ nk_allegro_handle_event(ALLEGRO_EVENT *evt)
} else if (evt->type == ALLEGRO_EVENT_KEY_CHAR) {
/* text input */
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);
}
}