demo-input: pass 'q' through in addition to interrupt

This commit is contained in:
nick black 2019-12-24 01:17:02 -05:00
parent a14ec34d78
commit 2601fe9191
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -68,10 +68,12 @@ ultramegaok_demo(void* vnc){
} }
if(nckey_mouse_p(ni.id)){ if(nckey_mouse_p(ni.id)){
// FIXME // FIXME
}else if(ni.id == 'q'){
interrupt_demo();
return NULL;
}else{ }else{
if(ni.id == 'q'){
interrupt_demo();
}
// go ahead and pass through the keyboard press, even if it was a 'q'
// (this might cause the demo to exit immediately, as is desired)
pass_along(&ni); pass_along(&ni);
} }
} }