Set cache dir before loading config.

The config will try to check ISOs for existence, which may use the cache.
This commit is contained in:
Unknown W. Brackets committed 2016-02-27 13:10:08 -08:00
1 parent 8e7de00eec
commit 7ab3de299c
1 file changed
+5 -5
+5 -5
View File
@@ -347,6 +347,11 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
g_Config.flash0Directory = File::GetExeDirectory() + "/flash0/";
#endif
if (cache_dir && strlen(cache_dir)) {
DiskCachingFileLoaderCache::SetCacheDir(cache_dir);
g_Config.appCacheDirectory = cache_dir;
}
#ifndef _WIN32
logger = new AndroidLogger();
@@ -505,11 +510,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
if (GetGPUBackend() == GPUBackend::OPENGL) {
gl_lost_manager_init();
}
if (cache_dir && strlen(cache_dir)) {
DiskCachingFileLoaderCache::SetCacheDir(cache_dir);
g_Config.appCacheDirectory = cache_dir;
}
}
void NativeInitGraphics(GraphicsContext *graphicsContext) {