clang-format
mogudes coses de config.yaml a debug.yaml
This commit is contained in:
@@ -57,6 +57,13 @@ SDL_AppResult SDL_AppInit(void** /*appstate*/, int /*argc*/, char* /*argv*/[]) {
|
||||
Options::setConfigFile(std::string(file_getconfigfolder()) + "config.yaml");
|
||||
Options::loadFromFile();
|
||||
|
||||
#ifndef NDEBUG
|
||||
// debug.yaml: estat inicial de gameplay per a tests ràpids,
|
||||
// només en builds de debug.
|
||||
Options::setDebugFile(std::string(file_getconfigfolder()) + "debug.yaml");
|
||||
Options::loadDebugFromFile();
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
// MEMFS no persistix entre recàrregues: força valors sensats per a web.
|
||||
Options::window.fullscreen = false;
|
||||
@@ -112,6 +119,9 @@ void SDL_AppQuit(void* /*appstate*/, SDL_AppResult /*result*/) {
|
||||
Director::get()->teardown();
|
||||
|
||||
Options::saveToFile();
|
||||
#ifndef NDEBUG
|
||||
Options::saveDebugToFile();
|
||||
#endif
|
||||
|
||||
Director::destroy();
|
||||
Menu::destroy();
|
||||
|
||||
Reference in New Issue
Block a user