Created
March 29, 2020 01:20
-
-
Save jpcima/feb9aead87c842fca29f00c89f712884 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seulement dans sfizz/vst/external/VST_SDK/VST3_SDK.old: doc | |
diff -ru sfizz/vst/external/VST_SDK/VST3_SDK.old/public.sdk/source/vst/vstguieditor.cpp sfizz/vst/external/VST_SDK/VST3_SDK/public.sdk/source/vst/vstguieditor.cpp | |
--- sfizz/vst/external/VST_SDK/VST3_SDK.old/public.sdk/source/vst/vstguieditor.cpp 2019-12-02 13:58:41.000000000 +0100 | |
+++ sfizz/vst/external/VST_SDK/VST3_SDK/public.sdk/source/vst/vstguieditor.cpp 2020-03-29 03:13:36.489821616 +0200 | |
@@ -57,6 +57,7 @@ | |
#include "vstgui_win32_bundle_support.h" | |
#endif // SMTG_MODULE_IS_BUNDLE | |
#elif SMTG_OS_LINUX | |
+#include "vstgui/lib/platform/linux/x11platform.h" | |
extern void* moduleHandle; | |
namespace VSTGUI { | |
void* soHandle = nullptr; | |
@@ -83,6 +84,7 @@ | |
#endif | |
} | |
#elif SMTG_OS_LINUX | |
+ X11::Platform::getInstance(); | |
VSTGUI::soHandle = moduleHandle; | |
#endif | |
// create a timer used for idle update: will call notify method | |
diff -ru sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/cairofont.cpp sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/cairofont.cpp | |
--- sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/cairofont.cpp 2019-12-02 13:58:51.000000000 +0100 | |
+++ sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/cairofont.cpp 2020-03-29 01:37:23.096398778 +0100 | |
@@ -142,9 +142,10 @@ | |
{ | |
FcInit (); | |
auto config = FcInitLoadConfigAndFonts (); | |
- if (!X11::Frame::resourcePath.empty ()) | |
+ const UTF8String& resourcePath = X11::Frame::getResourcePath(); | |
+ if (!resourcePath.empty ()) | |
{ | |
- auto fontDir = X11::Frame::resourcePath + "Fonts/"; | |
+ auto fontDir = resourcePath + "Fonts/"; | |
FcConfigAppFontAddDir (config, reinterpret_cast<const FcChar8*> (fontDir.data ())); | |
} | |
diff -ru sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/x11frame.cpp sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/x11frame.cpp | |
--- sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/x11frame.cpp 2019-12-02 13:58:51.000000000 +0100 | |
+++ sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/x11frame.cpp 2020-03-29 01:35:43.566394680 +0100 | |
@@ -794,7 +794,20 @@ | |
}; | |
//------------------------------------------------------------------------ | |
-UTF8String Frame::resourcePath = Platform::getInstance ().getPath () + "/Contents/Resources/"; | |
+const UTF8String& Frame::getResourcePath() | |
+{ | |
+ if (!userDefinedResourcePath.empty ()) | |
+ { | |
+ return userDefinedResourcePath; | |
+ } | |
+ else | |
+ { | |
+ static UTF8String path = Platform::getInstance ().getPath () + "/Contents/Resources/"; | |
+ return path; | |
+ } | |
+} | |
+ | |
+UTF8String Frame::userDefinedResourcePath; | |
//------------------------------------------------------------------------ | |
} // X11 | |
diff -ru sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/x11frame.h sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/x11frame.h | |
--- sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/lib/platform/linux/x11frame.h 2019-12-02 13:58:51.000000000 +0100 | |
+++ sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/lib/platform/linux/x11frame.h 2020-03-29 01:34:03.719723901 +0100 | |
@@ -34,7 +34,9 @@ | |
static CreateIResourceInputStreamFunc createResourceInputStreamFunc; | |
- static UTF8String resourcePath; | |
+ static const UTF8String& getResourcePath(); | |
+ | |
+ static UTF8String userDefinedResourcePath; | |
private: | |
bool getGlobalPosition (CPoint& pos) const override; | |
diff -ru sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/standalone/source/platform/gdk/gdkapplication.cpp sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/standalone/source/platform/gdk/gdkapplication.cpp | |
--- sfizz/vst/external/VST_SDK/VST3_SDK.old/vstgui4/vstgui/standalone/source/platform/gdk/gdkapplication.cpp 2019-12-02 13:58:50.000000000 +0100 | |
+++ sfizz/vst/external/VST_SDK/VST3_SDK/vstgui4/vstgui/standalone/source/platform/gdk/gdkapplication.cpp 2020-03-29 01:36:35.923063503 +0100 | |
@@ -104,7 +104,7 @@ | |
path += desc.u.name; | |
return FileResourceInputStream::create (path); | |
}; | |
- VSTGUI::X11::Frame::resourcePath = execPath + "/Resources/"; | |
+ VSTGUI::X11::Frame::userDefinedResourcePath = execPath + "/Resources/"; | |
PlatformCallbacks callbacks; | |
callbacks.quit = [this]() { quit (); }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment