Fix modgui after latest changes, correct full screen behaviour
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
7c67f50d4d
commit
3022008706
5 changed files with 27 additions and 10 deletions
2
dpf
2
dpf
|
@ -1 +1 @@
|
|||
Subproject commit e288f163bbf3af6ae24e9df6cdd23e755ff1aaf5
|
||||
Subproject commit ed6a093adea616cc856ef0ccb7a508410f017620
|
|
@ -376,7 +376,7 @@ static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv,
|
|||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
#if defined(DISTRHO_OS_WASM) && !defined(CARDINAL_COMMON_UI_ONLY)
|
||||
static void WebBrowserDataLoaded(void* const data)
|
||||
{
|
||||
static_cast<Initializer*>(data)->loadSettings(true);
|
||||
|
@ -503,7 +503,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB
|
|||
if (isRealInstance)
|
||||
{
|
||||
system::createDirectory(asset::userDir);
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
#if defined(DISTRHO_OS_WASM) && !defined(CARDINAL_COMMON_UI_ONLY)
|
||||
EM_ASM({
|
||||
Module.FS.mount(Module.IDBFS, {}, '/userfiles');
|
||||
Module.FS.syncfs(true, function(err) { if (!err) { dynCall('vi', $0, [$1]) } });
|
||||
|
@ -735,9 +735,11 @@ void syncfs()
|
|||
{
|
||||
settings::save();
|
||||
|
||||
#ifndef CARDINAL_COMMON_UI_ONLY
|
||||
EM_ASM({
|
||||
Module.FS.syncfs(false, function(){} );
|
||||
});
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -267,6 +267,9 @@ include ../../dpf/Makefile.plugins.mk
|
|||
|
||||
BASE_FLAGS += -DPRIVATE=
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# Extra flags for MOD and Mini stuff
|
||||
|
||||
ifeq ($(MOD_BUILD),true)
|
||||
BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff
|
||||
BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1
|
||||
|
@ -284,9 +287,6 @@ LINK_FLAGS += -sALLOW_MEMORY_GROWTH
|
|||
LINK_FLAGS += -sINITIAL_MEMORY=64Mb
|
||||
LINK_FLAGS += -sLZ4=1
|
||||
LINK_FLAGS += -sSTACK_SIZE=5MB
|
||||
LINK_FLAGS += -lidbfs.js
|
||||
|
||||
JACK_LIBS += -sEXPORTED_RUNTIME_METHODS=IDBFS,FS,cwrap
|
||||
|
||||
ifeq ($(CARDINAL_VARIANT),mini)
|
||||
LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources
|
||||
|
@ -296,6 +296,11 @@ LINK_FLAGS += --use-preload-cache
|
|||
LINK_FLAGS += --use-preload-plugins
|
||||
endif
|
||||
|
||||
ifneq ($(DSP_UI_SPLIT),true)
|
||||
LINK_FLAGS += -lidbfs.js
|
||||
JACK_LIBS += -sEXPORTED_RUNTIME_METHODS=IDBFS,FS,cwrap
|
||||
endif
|
||||
|
||||
# find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort
|
||||
SYMLINKED_DIRS_RESOURCES = Fundamental/presets
|
||||
ifneq ($(CARDINAL_VARIANT),mini)
|
||||
|
|
|
@ -165,7 +165,6 @@ struct FileButton : MenuButton {
|
|||
menu->addChild(createMenuItem("New (factory template)", "", []() {
|
||||
patchUtils::loadTemplateDialog(true);
|
||||
}));
|
||||
#endif
|
||||
|
||||
#ifndef DISTRHO_OS_WASM
|
||||
constexpr const char* const OpenName = "Open...";
|
||||
|
@ -195,6 +194,7 @@ struct FileButton : MenuButton {
|
|||
}));
|
||||
}
|
||||
}, settings::recentPatchPaths.empty()));
|
||||
#endif
|
||||
|
||||
if (!demoPatches.empty())
|
||||
{
|
||||
|
@ -220,11 +220,11 @@ struct FileButton : MenuButton {
|
|||
}));
|
||||
}
|
||||
|
||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
menu->addChild(createMenuItem("Import selection...", "", [=]() {
|
||||
patchUtils::loadSelectionDialog();
|
||||
}, false, true));
|
||||
|
||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
menu->addChild(new ui::MenuSeparator);
|
||||
|
||||
#ifndef DISTRHO_OS_WASM
|
||||
|
@ -266,7 +266,6 @@ struct FileButton : MenuButton {
|
|||
menu->addChild(createMenuItem("Overwrite template", "", []() {
|
||||
patchUtils::saveTemplateDialog();
|
||||
}));
|
||||
#endif
|
||||
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
menu->addChild(new ui::MenuSeparator);
|
||||
|
@ -278,6 +277,7 @@ struct FileButton : MenuButton {
|
|||
}, WebBrowserDataSaved);
|
||||
}));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
#ifdef __MOD_DEVICES__
|
||||
|
@ -598,6 +598,7 @@ struct KnobScrollSensitivitySlider : ui::Slider {
|
|||
};
|
||||
|
||||
|
||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
static void setAllFramebufferWidgetsDirty(widget::Widget* const widget)
|
||||
{
|
||||
for (widget::Widget* child : widget->children)
|
||||
|
@ -610,6 +611,7 @@ static void setAllFramebufferWidgetsDirty(widget::Widget* const widget)
|
|||
setAllFramebufferWidgetsDirty(child);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct ViewButton : MenuButton {
|
||||
|
@ -620,6 +622,7 @@ struct ViewButton : MenuButton {
|
|||
|
||||
menu->addChild(createMenuLabel("Appearance"));
|
||||
|
||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
std::string darkModeText;
|
||||
if (settings::darkMode)
|
||||
darkModeText = CHECKMARK_STRING;
|
||||
|
@ -627,6 +630,7 @@ struct ViewButton : MenuButton {
|
|||
switchDarkMode(!settings::darkMode);
|
||||
setAllFramebufferWidgetsDirty(APP->scene);
|
||||
}));
|
||||
#endif
|
||||
|
||||
menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips));
|
||||
|
||||
|
|
|
@ -805,9 +805,15 @@ int Window::getMods() {
|
|||
void Window::setFullScreen(bool fullScreen) {
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
if (fullScreen)
|
||||
emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false);
|
||||
{
|
||||
try {
|
||||
emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false);
|
||||
} DISTRHO_SAFE_EXCEPTION("fullscreen");
|
||||
}
|
||||
else
|
||||
{
|
||||
emscripten_exit_fullscreen();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue