Ignore dynamic light/dark mode in headless builds
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
e4840dfbf0
commit
930a0ca31e
3 changed files with 24 additions and 0 deletions
|
|
@ -31,8 +31,10 @@
|
|||
namespace rack {
|
||||
namespace asset {
|
||||
|
||||
#ifndef HEADLESS
|
||||
extern bool forceBlackScrew;
|
||||
extern bool forceSilverScrew;
|
||||
#endif
|
||||
|
||||
std::string userDir; // ignored
|
||||
std::string systemDir; // points to plugin resources dir (or installed/local Rack dir)
|
||||
|
|
@ -53,10 +55,12 @@ std::string user(std::string filename) {
|
|||
|
||||
// get system resource, trimming "res/" prefix if we are loaded as a plugin bundle
|
||||
std::string system(std::string filename) {
|
||||
#ifndef HEADLESS
|
||||
/**/ if (forceBlackScrew && string::endsWith(filename, "/ScrewBlack.svg"))
|
||||
filename = filename.substr(0, filename.size()-15) + "/./ScrewBlack.svg";
|
||||
else if (forceSilverScrew && string::endsWith(filename, "/ScrewSilver.svg"))
|
||||
filename = filename.substr(0, filename.size()-16) + "/./ScrewSilver.svg";
|
||||
#endif
|
||||
return system::join(systemDir, bundlePath.empty() ? filename : trim(filename));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue