Skip to content

Dynamic side loading of cores#18788

Open
dragoonDorise wants to merge 1 commit intolibretro:masterfrom
emudeck-android-forks:patch
Open

Dynamic side loading of cores#18788
dragoonDorise wants to merge 1 commit intolibretro:masterfrom
emudeck-android-forks:patch

Conversation

@dragoonDorise
Copy link
Copy Markdown

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
  4. RetroArch codebase follows C89 coding rules for portability across many old platforms check using C89_BUILD=1

Description

This PR allows RetroArch Android to sideload cores using the LIBRETRO argument, you can pass a path in that argument and the code will copy that core to /data/user/0 if it's not there already.

Launch command example:

am start
  -n com.retroarch/com.retroarch.browser.retroactivity.RetroActivityFuture
  -e ROM {file.path}
  -e LIBRETRO /storage/emulated/0/RetroArch/cores/gambatte_libretro_android.so
  -e CONFIGFILE /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg
  -e IME com.android.inputmethod.latin/.LatinIME
  -e DATADIR /data/data/com.retroarch
  -e APK /data/app/com.retroarch-1/base.apk
  -e SDCARD /storage/emulated/0
  -e EXTERNAL /storage/emulated/0/Android/data/com.retroarch/files

That command will copy /storage/emulated/0/RetroArch/cores/gambatte_libretro_android.so to /data/data/com.retroarch/cores/mgba_libretro_android.so and use it to launch the provided {file.path}

This has been tested with launchers like ESDE that uses the current LIBRETO argument and has been proved to work too if the user has manually downloaded the core.

-e LIBRETRO /data/data/com.retroarch/cores/mgba_libretro_android.so

In a nutshell, you can use the data/data path or a custom path, the code takes care of it.

Related Issues

None

Related Pull Requests

None

Reviewers

[If possible @mention all the people that should review your pull request]

@hizzlekizzle
Copy link
Copy Markdown
Collaborator

Let me see if I can get some discussion going on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants