diff options
Diffstat (limited to 'calibrate.c')
-rw-r--r-- | calibrate.c | 10 |
1 files changed, 9 insertions, 1 deletions
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" ); } |