From a96dd89c915b5721ed3ce9d41a1d2388651e9ce7 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 11 Mar 2017 18:33:04 -0500 Subject: general updates from the current livestream. --- calibrate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'calibrate.c') diff --git a/calibrate.c b/calibrate.c index 82da7a7..be506a1 100644 --- a/calibrate.c +++ b/calibrate.c @@ -13,6 +13,7 @@ #include "src/survive_config.h" struct SurviveContext * ctx; +int quit = 0; void HandleKey( int keycode, int bDown ) { @@ -26,6 +27,10 @@ void HandleKey( int keycode, int bDown ) { survive_send_magic(ctx,0,0,0); } + if( keycode == 'Q' || keycode == 'q' ) + { + quit = 1; + } } void HandleButton( int x, int y, int button, int bDown ) @@ -163,10 +168,13 @@ int main() return 1; } - while(survive_poll(ctx) == 0) + while(survive_poll(ctx) == 0 && !quit) { //Do stuff. } + + survive_close( ctx ); + printf( "Returned\n" ); } -- cgit v1.2.3