58 |
// |
// |
59 |
class GigEditState : public sigc::trackable { |
class GigEditState : public sigc::trackable { |
60 |
public: |
public: |
61 |
GigEditState(GigEdit* parent) : parent(parent) { } |
GigEditState(GigEdit* parent) : parent(parent), instrument(NULL) { } |
62 |
void run(gig::Instrument* pInstrument); |
void run(gig::Instrument* pInstrument); |
63 |
|
|
64 |
MainWindow* window; |
MainWindow* window; |
401 |
mutex.lock(); // lock access to static variables |
mutex.lock(); // lock access to static variables |
402 |
|
|
403 |
static bool main_loop_started = false; |
static bool main_loop_started = false; |
404 |
|
instrument = pInstrument; |
405 |
if (!main_loop_started) { |
if (!main_loop_started) { |
406 |
#if defined(__APPLE__) |
#if defined(__APPLE__) |
407 |
// spawn GUI on main thread : |
// spawn GUI on main thread : |
467 |
printf("GUI is now initialized. Everything done.\n"); fflush(stdout); |
printf("GUI is now initialized. Everything done.\n"); fflush(stdout); |
468 |
main_loop_started = true; |
main_loop_started = true; |
469 |
} |
} |
|
instrument = pInstrument; |
|
470 |
current = this; |
current = this; |
471 |
dispatcher->emit(); |
dispatcher->emit(); |
472 |
open.wait(); // wait until the GUI thread has read current |
open.wait(); // wait until the GUI thread has read current |