Tweak wasm build, add persistent storage

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-21 04:39:27 +02:00
parent 9aba0e034a
commit e6a799cd4c
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
10 changed files with 150 additions and 40 deletions

View file

@ -62,6 +62,11 @@
#endif
namespace rack {
#ifdef DISTRHO_OS_WASM
namespace asset {
std::string patchesPath();
}
#endif
namespace engine {
void Engine_setAboutToClose(Engine*);
void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*);
@ -246,7 +251,7 @@ static void downloadRemotePatchFailed(const char* const filename)
}
using namespace rack;
context->patch->templatePath = system::join(asset::systemDir, "init/wasm.vcv"); // FIXME
context->patch->templatePath = rack::system::join(asset::patchesPath(), "templates/main.vcv");
context->patch->loadTemplate();
context->scene->rackScroll->reset();
}
@ -1228,7 +1233,11 @@ protected:
context->patch->pushRecentPath(sfilename);
context->history->setSaved();
#ifdef DISTRHO_OS_WASM
rack::syncfs();
#else
rack::settings::save();
#endif
}
#if 0