game: auto-save pc-settings to user's home directory as well as memcard files (#1233)

* cmake: reduce warning spam especially from libs

* runtime: add FS helper functions

* game: save/restore pc-settings | add original aspect option

* game: overwrite unloadable settings with defaults

* temp: unable to set the games aspect-ratio in the boot else crash?

* runtime: save memcard files to user directory as well

* runtime: fix `pckernel` load order which resolves setting the orig aspect ratio

* lint: format

* cmake: revert warning suppression, it's just causing problems it seems

* fix the order of the rest of `pckernel` and creation of obj file paths

* lint: formatting

* game: don't save settings on startup even if they are corrupted
This commit is contained in:
Tyler Wilding
2022-03-20 20:29:44 -04:00
committed by GitHub
parent 44459757b5
commit 014da6f59d
26 changed files with 424 additions and 322 deletions
@@ -212,9 +212,9 @@ Val* Compiler::compile_asm_file(const goos::Object& form, const goos::Object& re
// save file
if (write) {
file_util::create_dir_if_needed(file_util::get_file_path({"out", "obj"}));
file_util::write_binary_file(file_util::get_file_path({"out", "obj", obj_file_name + ".o"}),
(void*)data.data(), data.size());
auto path = file_util::get_file_path({"out", "obj", obj_file_name + ".o"});
file_util::create_dir_if_needed_for_file(path);
file_util::write_binary_file(path, (void*)data.data(), data.size());
}
} else {
if (load) {