Skip to content

Commit 1f3749a

Browse files
committed
Show plugin version in editor popup menu
1 parent 18120ff commit 1f3749a

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

Source/Processors/PluginManager/PluginManager.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@
3838
static inline void closeHandle(decltype(LoadedLibInfo::handle) handle) {
3939
if (handle) {
4040
#ifdef _WIN32
41-
reeLibrary(handle);
41+
FreeLibrary(handle);
4242
#elif defined(__APPLE__)
4343
CF::CFBundleUnloadExecutable(handle);
4444
CF::CFRelease(handle);
4545
#else
46-
dlclose(handle);
46+
if (dlclose(handle) != 0) {
47+
LOGE("Failed to close handle");
48+
}
4749
#endif
4850
}
4951
}
@@ -255,7 +257,7 @@ int PluginManager::loadPlugin(const String& pluginLoc) {
255257
Dynamic linker requires a C-style string, so we
256258
we have to convert first.
257259
*/
258-
const char* processorLocCString = static_cast<const char*>(pluginLoc.toUTF8());
260+
const char* processorLocCString = pluginLoc.toRawUTF8();
259261

260262
/*
261263
Changing this to resolve all variables immediately upon loading.

Source/UI/EditorViewport.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,14 @@ void EditorViewport::mouseDown(const MouseEvent& e)
812812

813813
m.addItem(6, "Save image...", true);
814814

815+
Plugin::Type type = editorArray[i]->getProcessor()->getPluginType();
816+
if (type != Plugin::Type::BUILT_IN && type != Plugin::Type::INVALID)
817+
{
818+
m.addSeparator();
819+
String pluginVer = editorArray[i]->getProcessor()->getLibVersion();
820+
m.addItem(7, "v" + pluginVer, false);
821+
}
822+
815823
const int result = m.show();
816824

817825
if (result == 1)

0 commit comments

Comments
 (0)