From 2601fe9191f4c0d189be122157462dd46ac8ce9b Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 24 Dec 2019 01:17:02 -0500 Subject: [PATCH] demo-input: pass 'q' through in addition to interrupt --- src/demo/input.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/demo/input.c b/src/demo/input.c index b8d478fd0..a5cce84d9 100644 --- a/src/demo/input.c +++ b/src/demo/input.c @@ -68,10 +68,12 @@ ultramegaok_demo(void* vnc){ } if(nckey_mouse_p(ni.id)){ // FIXME - }else if(ni.id == 'q'){ - interrupt_demo(); - return NULL; }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); } }