void init() { #ifdef __S3E__ _nfs.setPath("rom://"); _nfsWrite.setPath("ram://"); #endif #ifdef __ANDROID__ log::messageln("internal %s", SDL_AndroidGetInternalStoragePath()); log::messageln("external %s", SDL_AndroidGetExternalStoragePath()); _nfsWrite.setPath(SDL_AndroidGetInternalStoragePath()); #endif // __ANDROID__ #ifdef WIN32 _mkdir("../data-ram/"); _nfsWrite.setPath("../data-ram/"); #endif _nfs.mount(&_nfsWrite); //_nfs.mount(&_nfsExtended); }
void init(const char* company, const char* app) { if (_fsInitialized) return; _fsInitialized = true; #ifdef __S3E__ _nfs.setPath("rom://"); _nfsWrite.setPath("ram://"); #elif EMSCRIPTEN //mkdir("data-ram/", S_IRWXU|S_IRWXG|S_IRWXO); //_nfsWrite.setPath("data-ram/"); #elif __ANDROID__ log::messageln("internal %s", SDL_AndroidGetInternalStoragePath()); log::messageln("external %s", SDL_AndroidGetExternalStoragePath()); _nfsWrite.setPath(SDL_AndroidGetInternalStoragePath()); #elif OXYGINE_EDITOR #elif __APPLE__ _nfsWrite.setPath(getSupportFolder().c_str()); #else if (company && app && *company && *app) { char* base_path = SDL_GetPrefPath(company, app); if (base_path) { _nfsWrite.setPath(base_path); SDL_free(base_path); } } else { # ifdef _WIN32 _mkdir("../data-ram/"); # else mkdir("../data-ram/", ACCESSPERMS); # endif _nfsWrite.setPath("../data-ram/"); } #endif _nfs.mount(&_nfsWrite); }