commit 474c7b7cc3c77b400471a814d7f83e3ddcee14af
parent df5635ad2f8f5d0b3248a15a8c04a195a50797a3
Author: fundamental <[email protected]>
Date: Sun, 23 Jul 2017 10:34:07 -0400
Banks: Add Search Dir For WIN32 VST
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/Misc/Bank.cpp b/src/Misc/Bank.cpp
@@ -30,6 +30,9 @@
#include "Util.h"
#include "Part.h"
#include "BankDb.h"
+#ifndef WIN32
+#include <windows.h>
+#endif
using namespace std;
@@ -362,6 +365,18 @@ void Bank::rescanforbanks()
for(int i = 0; i < MAX_BANK_ROOT_DIRS; ++i)
if(!config->cfg.bankRootDirList[i].empty())
scanrootdir(config->cfg.bankRootDirList[i]);
+#ifdef WIN32
+ {
+ //Search the VST Directory for banks/preset/etc
+ char path[1024];
+ GetModuleFileName(GetModuleHandle("ZynAddSubFX.dll"), path, sizeof(path));
+ if(strstr(path, "ZynAddSubFX.dll")) {
+ strstr(path, "ZynAddSubFX.dll")[0] = 0;
+ strcat(path, "banks");
+ scanrootdir(path);
+ }
+ }
+#endif
//sort the banks
sort(banks.begin(), banks.end());