|
|
@@ -106,10 +106,10 @@ shift ( char **argv, int *argc, int n ) |
|
|
|
extern Timeline *timeline; |
|
|
|
|
|
|
|
void |
|
|
|
check_osc ( void * v ) |
|
|
|
check_nsm ( void * v ) |
|
|
|
{ |
|
|
|
nsm->check(); |
|
|
|
Fl::repeat_timeout( OSC_INTERVAL, check_osc, v ); |
|
|
|
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v ); |
|
|
|
} |
|
|
|
|
|
|
|
static int got_sigterm = 0; |
|
|
@@ -210,6 +210,9 @@ main ( int argc, char **argv ) |
|
|
|
if ( ! nsm->init() ); |
|
|
|
{ |
|
|
|
nsm->announce( nsm_url, APP_NAME, ":progress:switch:", argv[0] ); |
|
|
|
|
|
|
|
/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */ |
|
|
|
Fl::add_timeout( OSC_INTERVAL, check_nsm, NULL ); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
@@ -229,19 +232,21 @@ main ( int argc, char **argv ) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */ |
|
|
|
Fl::add_timeout( OSC_INTERVAL, check_osc, NULL ); |
|
|
|
|
|
|
|
Fl::add_check( check_sigterm ); |
|
|
|
|
|
|
|
Fl::run(); |
|
|
|
|
|
|
|
/* cleanup for valgrind's sake */ |
|
|
|
|
|
|
|
if ( engine ) |
|
|
|
{ |
|
|
|
delete engine; |
|
|
|
engine = NULL; |
|
|
|
} |
|
|
|
|
|
|
|
delete timeline; |
|
|
|
timeline = NULL; |
|
|
|
|
|
|
|
delete tle; |
|
|
|
tle = NULL; |
|
|
|
|
|
|
|