More wasm details, deal with requirements for -sMAIN_MODULE

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-07-09 23:11:02 +01:00
parent c3f271d9e9
commit d1d08e4704
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
12 changed files with 112 additions and 40 deletions

View file

@ -388,20 +388,9 @@ public:
#ifdef DISTRHO_OS_WASM
if (rack::patchStorageSlug != nullptr)
{
std::string url("/patchstorage.php?slug=");
url += rack::patchStorageSlug;
std::free(rack::patchStorageSlug);
rack::patchStorageSlug = nullptr;
psDialog = new WasmPatchStorageLoadingDialog();
emscripten_async_wget(url.c_str(), context->patch->templatePath.c_str(),
downloadPatchStorageSucceeded, downloadPatchStorageFailed);
}
else
{
new WasmWelcomeDialog();
}
#endif
context->window->step();
@ -443,6 +432,19 @@ public:
{
counterForSelfFocus = -1;
getWindow().focus();
#ifdef DISTRHO_OS_WASM
if (rack::patchStorageSlug != nullptr)
{
std::string url("/patchstorage.php?slug=");
url += rack::patchStorageSlug;
std::free(rack::patchStorageSlug);
rack::patchStorageSlug = nullptr;
emscripten_async_wget(url.c_str(), context->patch->templatePath.c_str(),
downloadPatchStorageSucceeded, downloadPatchStorageFailed);
}
#endif
}
if (filebrowserhandle != nullptr && fileBrowserIdle(filebrowserhandle))