diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java index cca12267b2..7597b437d5 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java @@ -17,12 +17,12 @@ public class GameFileCache @Keep private long mPointer; - public GameFileCache(String path) + public GameFileCache() { - mPointer = newGameFileCache(path); + mPointer = newGameFileCache(); } - private static native long newGameFileCache(String path); + private static native long newGameFileCache(); @Override public native void finalize(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/GameFileCacheService.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/GameFileCacheService.java index 6d3ee84e52..89e1a0896b 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/GameFileCacheService.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/GameFileCacheService.java @@ -172,7 +172,7 @@ public final class GameFileCacheService extends IntentService // Load the game list cache if it isn't already loaded, otherwise do nothing if (ACTION_LOAD.equals(intent.getAction()) && gameFileCache == null) { - GameFileCache temp = new GameFileCache(getCacheDir() + File.separator + "gamelist.cache"); + GameFileCache temp = new GameFileCache(); synchronized (temp) { gameFileCache = temp; diff --git a/Source/Android/jni/GameList/GameFileCache.cpp b/Source/Android/jni/GameList/GameFileCache.cpp index c611553aef..8428190f8a 100644 --- a/Source/Android/jni/GameList/GameFileCache.cpp +++ b/Source/Android/jni/GameList/GameFileCache.cpp @@ -27,10 +27,10 @@ static UICommon::GameFileCache* GetPointer(JNIEnv* env, jobject obj) extern "C" { #endif -JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_newGameFileCache( - JNIEnv* env, jclass, jstring path) +JNIEXPORT jlong JNICALL +Java_org_dolphinemu_dolphinemu_model_GameFileCache_newGameFileCache(JNIEnv* env, jclass) { - return reinterpret_cast(new UICommon::GameFileCache(GetJString(env, path))); + return reinterpret_cast(new UICommon::GameFileCache()); } JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_model_GameFileCache_finalize(JNIEnv* env, diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index f041a7d48d..76b6ac322d 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -43,10 +43,6 @@ GameFileCache::GameFileCache() : m_path(File::GetUserPath(D_CACHE_IDX) + "gameli { } -GameFileCache::GameFileCache(std::string path) : m_path(std::move(path)) -{ -} - void GameFileCache::ForEach(std::function&)> f) const { for (const std::shared_ptr& item : m_cached_files) diff --git a/Source/Core/UICommon/GameFileCache.h b/Source/Core/UICommon/GameFileCache.h index 2c3fd39492..074870f505 100644 --- a/Source/Core/UICommon/GameFileCache.h +++ b/Source/Core/UICommon/GameFileCache.h @@ -31,8 +31,7 @@ public: Yes = 1, }; - GameFileCache(); // Uses the default path - explicit GameFileCache(std::string path); + GameFileCache(); void ForEach(std::function&)> f) const;