| 1178 | } |
| 1179 | |
| 1180 | void saveTemplateDialog() |
| 1181 | { |
| 1182 | asyncDialog::create("Overwrite template patch?", []{ |
| 1183 | rack::system::createDirectories(system::getDirectory(APP->patch->templatePath)); |
| 1184 | |
| 1185 | try { |
| 1186 | APP->patch->save(APP->patch->templatePath); |
| 1187 | } |
| 1188 | catch (Exception& e) { |
| 1189 | asyncDialog::create(string::f("Could not save template patch: %s", e.what()).c_str()); |
| 1190 | return; |
| 1191 | } |
| 1192 | |
| 1193 | #ifdef DISTRHO_OS_WASM |
| 1194 | syncfs(); |
| 1195 | #endif |
| 1196 | }); |
| 1197 | } |
| 1198 | |
| 1199 | void openBrowser(const std::string& url) |
| 1200 | { |