From 490e6932ee87449d0b92522eb10166ca825526a5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 9 Jun 2012 08:48:53 +0100 Subject: [PATCH] Fix UI re-opening --- dssi-vst-server.cpp | 6 +++--- dssi-vst_gui.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dssi-vst-server.cpp b/dssi-vst-server.cpp index 97da73a..dd72f36 100644 --- a/dssi-vst-server.cpp +++ b/dssi-vst-server.cpp @@ -1228,10 +1228,10 @@ LRESULT WINAPI MainProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { - case WM_DESTROY: + case WM_CLOSE: remoteVSTServerInstance->terminateGUIProcess(); - guiVisible = false; - return 0; + remoteVSTServerInstance->hideGUI(); + return TRUE; } return DefWindowProc(hWnd, msg, wParam, lParam); diff --git a/dssi-vst_gui.cpp b/dssi-vst_gui.cpp index 742cbee..3b21737 100644 --- a/dssi-vst_gui.cpp +++ b/dssi-vst_gui.cpp @@ -134,7 +134,8 @@ control_handler(const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { static int count = 0; - cerr << "dssi-vst_gui: control_handler " << count++ << endl; + count++; + //cerr << "dssi-vst_gui: control_handler " << count++ << endl; return 0; } @@ -295,9 +296,14 @@ main(int argc, char **argv) cerr << "dssi-vst_gui[1]: exiting" << endl; } + free(hosthostname); + free(hostport); + free(hostpath); + lo_address_free(hostaddr); + lo_server_free(oscserver); + close(fifoFd); unlink(fifoFile); return 0; } -