More mini details, fake audio runs, set host param values

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-29 23:58:16 +00:00
parent d0eba9e1ae
commit 5e73b8c227
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
14 changed files with 427 additions and 127 deletions

View file

@ -135,6 +135,7 @@ struct FileButton : MenuButton {
patchUtils::loadTemplateDialog();
}));
#if ! CARDINAL_VARIANT_MINI
#ifndef DISTRHO_OS_WASM
menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() {
patchUtils::loadDialog();
@ -164,6 +165,7 @@ struct FileButton : MenuButton {
menu->addChild(createMenuItem("Save and download uncompressed", "", []() {
patchUtils::saveAsDialogUncompressed();
}));
#endif
#endif
menu->addChild(createMenuItem("Revert", RACK_MOD_CTRL_NAME "+" RACK_MOD_SHIFT_NAME "+O", []() {
@ -194,6 +196,7 @@ struct FileButton : MenuButton {
}
#endif
#if ! CARDINAL_VARIANT_MINI
#ifndef DISTRHO_OS_WASM
menu->addChild(new ui::MenuSeparator);
@ -206,6 +209,7 @@ struct FileButton : MenuButton {
patchUtils::saveAsDialogUncompressed();
}));
#endif
#endif
#if ! CARDINAL_VARIANT_MINI
if (!demoPatches.empty())
@ -761,9 +765,14 @@ struct MeterLabel : ui::Label {
// uiLastTime = time;
// }
#if CARDINAL_VARIANT_MINI
text = string::f("%.1f fps", 1.0 / frameDurationAvg);
#else
double meterAverage = APP->engine->getMeterAverage();
double meterMax = APP->engine->getMeterMax();
text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100);
#endif
Label::step();
}
};
@ -795,9 +804,11 @@ struct MenuBar : widget::OpaqueWidget {
viewButton->text = "View";
layout->addChild(viewButton);
#if ! CARDINAL_VARIANT_MINI
EngineButton* engineButton = new EngineButton;
engineButton->text = "Engine";
layout->addChild(engineButton);
#endif
HelpButton* helpButton = new HelpButton;
helpButton->text = "Help";

View file

@ -212,7 +212,11 @@ void Scene::step() {
if (remoteDetails->autoDeploy) {
const int actionIndex = APP->history->actionIndex;
const double time = system::getTime();
if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) {
if (internal->historyActionIndex == -1) {
internal->historyActionIndex = actionIndex;
internal->lastSceneChangeTime = time;
} else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) {
const std::string& name(APP->history->actions[actionIndex - 1]->name);
if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") {
printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str());