Implement openBrowser for wasm
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
c14eee850b
commit
74b41e1713
5 changed files with 28 additions and 10 deletions
|
@ -52,6 +52,10 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
# include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
const std::string CARDINAL_VERSION = "22.06";
|
||||
|
||||
namespace rack {
|
||||
|
@ -268,6 +272,17 @@ void saveAsDialogUncompressed()
|
|||
#endif
|
||||
}
|
||||
|
||||
void openBrowser(const std::string& url)
|
||||
{
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
EM_ASM({
|
||||
window.open(UTF8ToString($0), '_blank');
|
||||
}, url.c_str());
|
||||
#else
|
||||
patchUtils::openBrowser(url);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void async_dialog_filebrowser(const bool saving,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue