Skip to content

Commit ee18011

Browse files
DomClarkPhysSong
authored andcommitted
Fix toggling UI for non-embedded VST effects
1 parent 49dcd38 commit ee18011

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎plugins/VstEffect/VstEffectControlDialog.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
8282
connect( btn, SIGNAL( toggled( bool ) ),
8383
SLOT( togglePluginUI( bool ) ) );
8484
} else {
85-
connect( btn, SIGNAL( clicked( bool ) ),
86-
SLOT( togglePluginUI( bool ) ) );
85+
connect( btn, SIGNAL( clicked() ),
86+
m_plugin.data(), SLOT( toggleUI() ) );
8787
}
8888

8989
btn->setMinimumWidth( 78 );

‎plugins/vst_base/RemoteVstPlugin.cpp‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ class RemoteVstPlugin : public RemotePluginClient
293293
static DWORD WINAPI processingThread( LPVOID _param );
294294
static bool setupMessageWindow();
295295
static DWORD WINAPI guiEventLoop();
296-
static LRESULT CALLBACK messageWndProc( HWND hwnd, UINT uMsg,
297-
WPARAM wParam, LPARAM lParam );
296+
static LRESULT CALLBACK wndProc( HWND hwnd, UINT uMsg,
297+
WPARAM wParam, LPARAM lParam );
298298

299299

300300
private:
@@ -1884,8 +1884,6 @@ bool RemoteVstPlugin::setupMessageWindow()
18841884
__MessageHwnd = CreateWindowEx( 0, "LVSL", "dummy",
18851885
0, 0, 0, 0, 0, NULL, NULL,
18861886
hInst, NULL );
1887-
SetWindowLongPtr( __MessageHwnd, GWLP_WNDPROC,
1888-
reinterpret_cast<LONG_PTR>( RemoteVstPlugin::messageWndProc ) );
18891887
// install GUI update timer
18901888
SetTimer( __MessageHwnd, 1000, 50, NULL );
18911889

@@ -1910,7 +1908,7 @@ DWORD WINAPI RemoteVstPlugin::guiEventLoop()
19101908

19111909

19121910

1913-
LRESULT CALLBACK RemoteVstPlugin::messageWndProc( HWND hwnd, UINT uMsg,
1911+
LRESULT CALLBACK RemoteVstPlugin::wndProc( HWND hwnd, UINT uMsg,
19141912
WPARAM wParam, LPARAM lParam )
19151913
{
19161914
if( uMsg == WM_TIMER && __plugin->isInitialized() )
@@ -2004,7 +2002,7 @@ int main( int _argc, char * * _argv )
20042002

20052003
WNDCLASS wc;
20062004
wc.style = CS_HREDRAW | CS_VREDRAW;
2007-
wc.lpfnWndProc = DefWindowProc;
2005+
wc.lpfnWndProc = RemoteVstPlugin::wndProc;
20082006
wc.cbClsExtra = 0;
20092007
wc.cbWndExtra = 0;
20102008
wc.hInstance = hInst;

0 commit comments

Comments
 (0)