Browse Source

Use "canvas" html id for non-modgui builds

Signed-off-by: falkTX <falktx@falktx.com>
undefined
falkTX 2 years ago
parent
commit
c08e7517b4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 0 deletions
  1. +4
    -0
      dgl/src/ApplicationPrivateData.cpp
  2. +5
    -0
      distrho/src/DistrhoUIPrivateData.hpp

+ 4
- 0
dgl/src/ApplicationPrivateData.cpp View File

@@ -67,7 +67,11 @@ Application::PrivateData::PrivateData(const bool standalone)
DISTRHO_SAFE_ASSERT_RETURN(world != nullptr,);

puglSetWorldHandle(world, this);
#ifdef __EMSCRIPTEN__
puglSetClassName(world, "canvas");
#else
puglSetClassName(world, DISTRHO_MACRO_AS_STRING(DGL_NAMESPACE));
#endif
}

Application::PrivateData::~PrivateData()


+ 5
- 0
distrho/src/DistrhoUIPrivateData.hpp View File

@@ -108,6 +108,7 @@ public:
explicit PluginApplication(const char* className)
: DGL_NAMESPACE::Application(DISTRHO_UI_IS_STANDALONE)
{
#if defined(__MOD_DEVICES__) || !defined(__EMSCRIPTEN__)
if (className == nullptr)
{
className = (
@@ -120,6 +121,10 @@ public:
);
}
setClassName(className);
#else
// unused
(void)className;
#endif
}

void triggerIdleCallbacks()


Loading…
Cancel
Save