Save game to indexeddb

This commit is contained in:
Varun Patil 2020-05-05 23:19:00 +05:30
parent 17517a5849
commit ad9474a6e9
5 changed files with 65 additions and 1 deletions

View file

@ -59,5 +59,9 @@ void load_file_async(const char * filename) {
shState->fileSystem().openRead(handler, filename);
}
EM_JS(void, save_file_async_js, (const char* fullPathC), {
if (window.saveFile) window.saveFile(UTF8ToString(fullPathC));
});
#endif

View file

@ -8,6 +8,8 @@ extern "C" {
void load_file_async_js(const char* fullPathC);
void load_file_async(const char* filename);
void save_file_async_js(const char* fullPathC);
}
#endif