commit 68e595e03dbf01bd561fc74f910547fae87c3332
parent e2b1eb9b1077e6516c0cc4e2283e5c886bed0e58
Author: fundamental <[email protected]>
Date: Thu, 14 Jan 2010 16:16:01 -0500
UI: Corrected behavior for "-U" launch flag
Bug reported on KVR forum by pianolivier.
ZynAddSubFX tried to connect to X11 server even with "-U" flag because it
prematurely allocated the GUI before reading command line flags.
Fixed.
Diffstat:
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -974,3 +974,7 @@
the Wextra flag
- Minor change to Filter_ and FormantFilter to reduce unwanted warnings
+14 Jan 2010 (Mark McCurry)
+ - Fixed No UI Flag "-U" as it was previously partially initializing
+ the gui
+
diff --git a/src/main.cpp b/src/main.cpp
@@ -351,9 +351,6 @@ void initprogram()
#if (defined(NONEMIDIIN) || (defined(VSTMIDIIN)))
Midi = new NULLMidiIn();
#endif
-#ifndef DISABLE_GUI
- ui = new MasterUI(master, &Pexitprogram);
-#endif
}
/*
@@ -655,10 +652,6 @@ int main(int argc, char *argv[])
}
else {
master->applyparameters();
-#ifndef DISABLE_GUI
- if(noui == 0)
- ui->refresh_master_ui();
-#endif
cout << "Master file loaded." << endl;
}
}
@@ -673,10 +666,6 @@ int main(int argc, char *argv[])
}
else {
master->part[loadtopart]->applyparameters();
-#ifndef DISABLE_GUI
- if(noui == 0)
- ui->refresh_master_ui();
-#endif
cout << "Instrument file loaded." << endl;
}
}
@@ -701,8 +690,12 @@ int main(int argc, char *argv[])
// setregid(getuid(),getuid());
#endif
*/
- if(noui == 0)
+#ifndef DISABLE_GUI
+ if(noui == 0) {
+ ui = new MasterUI(master, &Pexitprogram);
pthread_create(&thr3, NULL, thread3, NULL);
+ }
+#endif
pthread_create(&thr4, NULL, thread4, NULL);
#ifdef WINMIDIIN