ZynAddSubFX: add preset directory to bankRootDirList
This commit fixes non-usable instrument bank browser in ZynAddSubFX, especially in win32 version. Adding the ZynAddSubFX preset directory (inside LMMS' preset directory) to config.cfg.bankRootDirList allows easy instrument browsing using ZynAddSubFX' instrument bank browser (closes #2627950).
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "remote_zynaddsubfx.h"
|
||||
|
||||
|
||||
std::string __presets_dir;
|
||||
|
||||
#define main unused_main
|
||||
#ifdef LMMS_BUILD_LINUX
|
||||
#define ATOM(x) (x)
|
||||
@@ -44,8 +46,6 @@
|
||||
|
||||
#include <FL/x.H>
|
||||
|
||||
std::string __presets_dir;
|
||||
|
||||
static pthread_t __gui_thread_handle;
|
||||
static pthread_mutex_t __gui_mutex;
|
||||
static std::queue<remotePluginClient::message> __gui_messages;
|
||||
@@ -104,6 +104,20 @@ public:
|
||||
|
||||
case IdZasfPresetDirectory:
|
||||
__presets_dir = _m.getString();
|
||||
for( int i = 0; i < MAX_BANK_ROOT_DIRS; ++i )
|
||||
{
|
||||
if( config.cfg.bankRootDirList[i] == NULL )
|
||||
{
|
||||
config.cfg.bankRootDirList[i] = new char[MAX_STRING_SIZE];
|
||||
strcpy(config.cfg.bankRootDirList[i], __presets_dir.c_str() );
|
||||
break;
|
||||
}
|
||||
else if( strcmp( config.cfg.bankRootDirList[i],
|
||||
__presets_dir.c_str() ) == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user