Move cores to an 'asset' folder - create a directory in phoenix/assets folder,

call it 'cores', move all the cores there. The APK extract and retroarch activity
libraries still need to remain in phoenix/libs. This will allow Lioncash to make
his core manager be able to uninstall cores etc.
This commit is contained in:
twinaphex 2013-10-30 01:07:49 +01:00
parent aaa8fc1f37
commit 9e4b672634
2 changed files with 3 additions and 4 deletions

View File

@ -44,8 +44,7 @@ public final class CoreSelection extends ListActivity {
setTitle(R.string.select_libretro_core);
// Populate the list
final String modulePath = getApplicationInfo().nativeLibraryDir;
final File[] libs = new File(modulePath).listFiles();
final File[] libs = new File(getApplicationInfo().dataDir, "cores").listFiles();
for (final File lib : libs) {
String libName = lib.getName();
@ -73,7 +72,7 @@ public final class CoreSelection extends ListActivity {
}
// Allow both libretro-core.so and libretro_core.so.
if (libName.startsWith("libretro") && !libName.startsWith("libretroarch")) {
if (libName.startsWith("libretro")) {
adapter.add(new ModuleWrapper(this, lib, core_config));
}
}

View File

@ -42,7 +42,7 @@ public final class MainMenuActivity extends PreferenceActivity {
// Get libretro path and name.
SharedPreferences prefs = UserPreferences.getPreferences(this);
libretro_path = prefs.getString("libretro_path", getApplicationInfo().nativeLibraryDir);
libretro_path = prefs.getString("libretro_path", getApplicationInfo().dataDir + "/cores");
libretro_name = prefs.getString("libretro_name", getString(R.string.no_core));
// Bind audio stream to hardware controls.