Skip to content

Commit 16296c1

Browse files
authored
Fix Vestige file browser filter (#7816)
- Remove pointless *.exe option - Add an "All VST files" option on Linux when there is both LinuxVST and Wine VST support - Remove *.dll option from Linux builds without Wine VST support (i.e. LinuxVST-only builds)
1 parent 8afe95a commit 16296c1

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

plugins/Vestige/Vestige.cpp

+17-9
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@ Plugin::Descriptor Q_DECL_EXPORT vestige_plugin_descriptor =
7979
0x0100,
8080
Plugin::Type::Instrument,
8181
new PluginPixmapLoader( "logo" ),
82-
#ifdef LMMS_BUILD_LINUX
83-
"dll,so",
84-
#else
82+
#if defined(LMMS_BUILD_WIN32)
8583
"dll",
84+
#elif defined(LMMS_BUILD_LINUX)
85+
# if defined(LMMS_HAVE_VST_32) || defined(LMMS_HAVE_VST_64)
86+
"dll,so",
87+
# else
88+
"so",
89+
# endif
8690
#endif
8791
nullptr,
8892
} ;
@@ -669,13 +673,17 @@ void VestigeInstrumentView::openPlugin()
669673

670674
// set filters
671675
QStringList types;
672-
types << tr( "DLL-files (*.dll)" )
673-
<< tr( "EXE-files (*.exe)" )
674-
#ifdef LMMS_BUILD_LINUX
675-
<< tr( "SO-files (*.so)" )
676+
#if defined(LMMS_BUILD_WIN32)
677+
types << tr("VST2 files (*.dll)");
678+
#elif defined(LMMS_BUILD_LINUX)
679+
# if defined(LMMS_HAVE_VST_32) || defined(LMMS_HAVE_VST_64)
680+
types << tr("All VST files (*.dll *.so)")
681+
<< tr("Windows VST2 files (*.dll)");
682+
# endif
683+
types << tr("LinuxVST files (*.so)");
676684
#endif
677-
;
678-
ofd.setNameFilters( types );
685+
686+
ofd.setNameFilters(types);
679687

680688
if( m_vi->m_pluginDLL != "" )
681689
{

src/gui/FileBrowser.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -1222,15 +1222,21 @@ void FileItem::determineFileType()
12221222
m_type = FileType::Midi;
12231223
m_handling = FileHandling::ImportAsProject;
12241224
}
1225-
else if( ext == "dll"
1226-
#ifdef LMMS_BUILD_LINUX
1227-
|| ext == "so"
1228-
#endif
1225+
#ifdef LMMS_HAVE_VST
1226+
else if (
1227+
# if defined(LMMS_BUILD_LINUX)
1228+
ext == "so" ||
1229+
# endif
1230+
# if defined(LMMS_HAVE_VST_32) || defined(LMMS_HAVE_VST_64)
1231+
ext == "dll" ||
1232+
# endif
1233+
false
12291234
)
12301235
{
12311236
m_type = FileType::VstPlugin;
12321237
m_handling = FileHandling::LoadByPlugin;
12331238
}
1239+
#endif
12341240
else if ( ext == "lv2" )
12351241
{
12361242
m_type = FileType::Preset;

src/lmmsconfig.h.in

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#cmakedefine LMMS_HAVE_SDL
3434
#cmakedefine LMMS_HAVE_STK
3535
#cmakedefine LMMS_HAVE_VST
36+
#cmakedefine LMMS_HAVE_VST_32
37+
#cmakedefine LMMS_HAVE_VST_64
3638
#cmakedefine LMMS_HAVE_SF_COMPLEVEL
3739

3840
#cmakedefine LMMS_DEBUG_FPE

0 commit comments

Comments
 (0)