mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-06 01:21:38 -05:00
-Hacked in support for laoding sessions from command line
This commit is contained in:
parent
61c9e8d329
commit
21a29dea60
1 changed files with 15 additions and 5 deletions
20
src/main.cxx
20
src/main.cxx
|
@ -31,20 +31,30 @@ void signalHanlder(int signum)
|
||||||
signalHanlderInt = signum;
|
signalHanlderInt = signum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gui_static_loadSession_cb(void* inst)
|
||||||
|
{
|
||||||
|
char* tmp = (char*) inst;
|
||||||
|
int sess = gui->getDiskReader()->readSession( tmp );
|
||||||
|
if ( sess != LUPPP_RETURN_OK )
|
||||||
|
LUPPP_ERROR( "Error loading session" );
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LUPPP_NOTE("%s", GIT_VERSION );
|
LUPPP_NOTE("%s", GIT_VERSION );
|
||||||
|
|
||||||
bool runTests = false;
|
bool runTests;
|
||||||
bool stopAfterTest = false;
|
if ( runTests ){} // remove unused warning if not built with BUILD_TESTS
|
||||||
if(runTests == stopAfterTest){} // warning
|
|
||||||
|
|
||||||
for(int i = 0; i < argc; i++)
|
for(int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
if ( strcmp(argv[i], "-test" ) == 0 ) {
|
if ( strcmp(argv[i], "-test" ) == 0 ) {
|
||||||
runTests = true;
|
runTests = true;
|
||||||
} else if ( strcmp( argv[i], "-stopAfterTest") == 0 ) {
|
}
|
||||||
stopAfterTest = true;
|
else
|
||||||
|
{
|
||||||
|
// assume filename, try load it
|
||||||
|
Fl::repeat_timeout( 1 / 30.f, &gui_static_loadSession_cb, argv[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue