fix misdesign of VST GUI thread

git-svn-id: svn://localhost/ardour2/trunk@1428 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2007-02-06 20:09:35 +00:00
parent 1161fa8731
commit 27cd4034bd
3 changed files with 12 additions and 4 deletions

View File

@@ -82,6 +82,7 @@ extern "C" {
#endif
extern int fst_init ();
extern void fst_finish ();
extern FSTHandle* fst_load (const char*);
extern int fst_unload (FSTHandle*);

View File

@@ -326,12 +326,12 @@ DWORD WINAPI gui_event_loop (LPVOID param)
fst_error ("cannot set timer on dummy window");
}
while (true) {
while (1) {
GetMessageA (&msg, NULL, 0,0);
if (msg.message == WM_QUIT) {
cerr << "WM QUIT received\n";
if (msg.message == WM_SYSTEMERROR) {
/* sent when this thread is supposed to exist */
break;
}
@@ -418,6 +418,12 @@ fst_init ()
return 0;
}
void
fst_finish ()
{
PostThreadMessageA (gui_thread_id, WM_SYSTEMERROR, 0, 0);
}
int
fst_run_editor (FST* fst)
{