Improve usability and style in web export presentation

- Check for WebGL support, don't load if unsupported
 - Check for IndexedDB support
 - Make canvas support check message visible
 - Colored debug output for warnings and errors
 - Make it obvious status can be closed by clicking
 - Don't use status to display non-critical errors
 - Limit output message count
 - Add clear output button
 - Fix setting total memory
This commit is contained in:
eska 2017-01-12 14:14:40 +01:00
parent 68422c5dd6
commit 1f7d4c4d0e
4 changed files with 245 additions and 184 deletions

View file

@ -502,18 +502,12 @@ bool OS_JavaScript::main_loop_iterate() {
time_to_save_sync-=elapsed;
print_line("elapsed "+itos(elapsed)+" tts "+itos(time_to_save_sync));
if (time_to_save_sync<0) {
//time to sync, for real
// run 'success'
print_line("DOING SYNCH!");
EM_ASM(
FS.syncfs(function (err) {
assert(!err);
console.log("Synched!");
//ccall('success', 'v');
});
FS.syncfs(function(err) {
if (err) { Module.printErr('Failed to save IDB file system: ' + err.message); }
});
);
}