From 1f7d4c4d0ee8eba0a1d8084019269a45dfa76be4 Mon Sep 17 00:00:00 2001 From: eska Date: Thu, 12 Jan 2017 14:14:40 +0100 Subject: 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 --- platform/javascript/os_javascript.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'platform/javascript/os_javascript.cpp') diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 14af9b3e3..aa728c768 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -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); } + }); ); } -- cgit v1.2.3-70-g09d2