Open Buggem opened 2 days ago
Are you configuring persistent data storage as described in Emscripten documentation?
@leo60228 Yes I have, this is my rundown code
int main() {
EM_ASM(
// Make a save directory
FS.mkdir('/home/web_user/.local/share/VVVVVV/saves');
FS.chmod('/home/web_user/.local/share/VVVVVV/saves', 777); // with or without, makes no difference, just emulating what the original VVVVVV C++ handling looked like (yes I am aware of bad permissions but this is WASM virtual machinery so I'm fine)
// Then mount with IDBFS type
FS.mount(IDBFS, {}, '/home/web_user/.local/share/VVVVVV/saves');
// Then sync
FS.syncfs(true, function (err) {
// Error
});
);
// open and save game
int off_file = fopen("/home/web_user/.local/share/VVVVVV/saves/qsave1.vvv");
...
// sync to make sure it is stored to IndexedDB
EM_ASM(
FS.syncfs(function (err) {
// Error
});
);
}```
I can't reproduce this issue.
When compiling with emscripten, save data does not persist. I noticed that there are handlings for this to save it but they are not working properly.