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
|
@ -36,9 +36,11 @@
|
|||
|
||||
namespace rack {
|
||||
|
||||
#ifndef HEADLESS
|
||||
namespace asset {
|
||||
void updateForcingBlackSilverScrewMode(std::string slug);
|
||||
}
|
||||
#endif
|
||||
|
||||
struct CardinalPluginModelHelper : plugin::Model {
|
||||
virtual app::ModuleWidget* createModuleWidgetFromEngineLoad(engine::Module* m) = 0;
|
||||
|
@ -76,7 +78,9 @@ struct CardinalPluginModel : CardinalPluginModelHelper
|
|||
}
|
||||
tm = dynamic_cast<TModule*>(m);
|
||||
}
|
||||
#ifndef HEADLESS
|
||||
asset::updateForcingBlackSilverScrewMode(slug);
|
||||
#endif
|
||||
app::ModuleWidget* const tmw = new TModuleWidget(tm);
|
||||
DISTRHO_CUSTOM_SAFE_ASSERT_RETURN(m != nullptr ? m->model->name.c_str() : "null", tmw->module == m, nullptr);
|
||||
tmw->setModel(this);
|
||||
|
@ -91,7 +95,9 @@ struct CardinalPluginModel : CardinalPluginModelHelper
|
|||
TModule* const tm = dynamic_cast<TModule*>(m);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(tm != nullptr, nullptr);
|
||||
|
||||
#ifndef HEADLESS
|
||||
asset::updateForcingBlackSilverScrewMode(slug);
|
||||
#endif
|
||||
TModuleWidget* const tmw = new TModuleWidget(tm);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(tmw->module == m, nullptr);
|
||||
tmw->setModel(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue