mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
This commit is contained in:
parent
716f7ef9ac
commit
a24962151e
17 changed files with 332 additions and 113 deletions
|
|
@ -167,6 +167,9 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
|
|||
jassert (appInstance == 0);
|
||||
appInstance = app;
|
||||
|
||||
app->commandLineParameters = commandLine.trim();
|
||||
commandLine = String::empty;
|
||||
|
||||
initialiseJuce_GUI();
|
||||
|
||||
InterProcessLock* appLock = 0;
|
||||
|
|
@ -177,11 +180,10 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
|
|||
|
||||
if (! appLock->enter(0))
|
||||
{
|
||||
MessageManager::broadcastMessage (app->getApplicationName() + "/" + commandLine);
|
||||
MessageManager::broadcastMessage (app->getApplicationName() + "/" + app->commandLineParameters);
|
||||
|
||||
delete appInstance;
|
||||
appInstance = 0;
|
||||
commandLine = String::empty;
|
||||
|
||||
DBG ("Another instance is running - quitting...");
|
||||
return 0;
|
||||
|
|
@ -193,9 +195,7 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
|
|||
juce_setCurrentThreadName ("Juce Message Thread");
|
||||
|
||||
// let the app do its setting-up..
|
||||
app->initialise (commandLine.trim());
|
||||
|
||||
commandLine = String::empty;
|
||||
app->initialise (app->commandLineParameters);
|
||||
|
||||
// register for broadcast new app messages
|
||||
MessageManager::getInstance()->registerBroadcastListener (app);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue