showdialog: enter = 0, escape = 2

This commit is contained in:
K. Lange 2018-11-19 16:10:35 +09:00
parent 0741d625c9
commit ba701ea0e3

View File

@ -257,8 +257,12 @@ int main(int argc, char * argv[]) {
case YUTANI_MSG_KEY_EVENT:
{
struct yutani_msg_key_event * ke = (void*)m->data;
if (ke->event.action == KEY_ACTION_DOWN && ke->event.keycode == 'q') {
if (ke->event.action == KEY_ACTION_DOWN && ke->event.keycode == '\n') {
playing = 0;
status = 0;
} else if (ke->event.action == KEY_ACTION_DOWN && ke->event.keycode == KEY_ESCAPE) {
playing = 0;
status = 2;
}
}
break;