mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-14 20:20:35 -04:00
Added support for profile command line option
This commit is contained in:
@@ -95,7 +95,7 @@ int main( int argc, char * * argv )
|
||||
bool core_only = false;
|
||||
bool fullscreen = true;
|
||||
bool exit_after_import = false;
|
||||
QString file_to_load, file_to_save, file_to_import, render_out;
|
||||
QString file_to_load, file_to_save, file_to_import, render_out, profilerOutputFile;
|
||||
|
||||
for( int i = 1; i < argc; ++i )
|
||||
{
|
||||
@@ -341,6 +341,11 @@ int main( int argc, char * * argv )
|
||||
exit_after_import = true;
|
||||
}
|
||||
}
|
||||
else if( argc > i && ( QString( argv[i] ) == "--profile" || QString( argv[i] ) == "-p" ) )
|
||||
{
|
||||
profilerOutputFile = argv[i+1];
|
||||
++i;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( argv[i][0] == '-' )
|
||||
@@ -496,6 +501,11 @@ int main( int argc, char * * argv )
|
||||
SLOT( updateConsoleProgress() ) );
|
||||
t->start( 200 );
|
||||
|
||||
if( profilerOutputFile.isEmpty() == false )
|
||||
{
|
||||
engine::mixer()->profiler().setOutputFile( profilerOutputFile );
|
||||
}
|
||||
|
||||
// start now!
|
||||
r->startProcessing();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user