Skip to content

Commit 4c7c68f

Browse files
justnopePhysSongDomClark
committed
Initialise OLE in RemoteVstPlugin
Some plugins don't initialise it themselves, expecting it already to be done for them, and so are liable to hang without it (e.g. TX16Wx). Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com> Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
1 parent 0ad8527 commit 4c7c68f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/vst_base/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ SET(WINE_CXX_ARGS
5656
-L${WINE_LIBRARY_DIR}
5757
${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp
5858
-std=c++0x
59-
-mwindows -lpthread ${EXTRA_FLAGS} -fno-omit-frame-pointer
59+
-mwindows -lpthread -lole32 ${EXTRA_FLAGS} -fno-omit-frame-pointer
6060
${WINE_BUILD_FLAGS}
6161
-o ../RemoteVstPlugin
6262
)

plugins/vst_base/RemoteVstPlugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,8 @@ int main( int _argc, char * * _argv )
20612061
return -1;
20622062
}
20632063

2064+
OleInitialize(nullptr);
2065+
20642066
#ifdef LMMS_BUILD_WIN32
20652067
#ifndef __WINPTHREADS_VERSION
20662068
// (non-portable) initialization of statically linked pthread library
@@ -2176,6 +2178,7 @@ int main( int _argc, char * * _argv )
21762178

21772179
delete __plugin;
21782180

2181+
OleUninitialize();
21792182

21802183
#ifdef LMMS_BUILD_WIN32
21812184
#ifndef __WINPTHREADS_VERSION

0 commit comments

Comments
 (0)