diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-24 10:13:23 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-24 10:13:23 -0600 |
commit | d5c42c4951261c401c5f9148ce2d6bb1402ce75b (patch) | |
tree | 1ff58058d0810f2f82ecc8f3882b9f68f8748409 /calibrate.c | |
parent | b45e58d9f75747e8727ac6cd0594a921e945c7e2 (diff) | |
download | libsurvive-d5c42c4951261c401c5f9148ce2d6bb1402ce75b.tar.gz libsurvive-d5c42c4951261c401c5f9148ce2d6bb1402ce75b.tar.bz2 |
Some minor fixups around command line processing
Diffstat (limited to 'calibrate.c')
-rw-r--r-- | calibrate.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/calibrate.c b/calibrate.c index e0426f7..569c5cb 100644 --- a/calibrate.c +++ b/calibrate.c @@ -393,9 +393,6 @@ char * const * gargv; void * SurviveThread(void *jnk) { - ctx = survive_init( gargc, gargv ); - - uint8_t i =0; for (i=0;i<32;++i) { sensor_name[i] = malloc(3); @@ -433,8 +430,14 @@ int main( int argc, char ** argv ) { gargc = argc; gargv = argv; + + ctx = survive_init(gargc, gargv); + if (ctx == 0) { // Implies --help or similiar + return -1; + } + // Create the survive thread - OGCreateThread( SurviveThread, 0 ); + OGCreateThread(SurviveThread, 0); // Wait for the survive thread to load while(!SurviveThreadLoaded){ OGUSleep(100); } |