Skurdt / LibretroUnityFE

Example scenes on how to use the SK.Libretro package/library.
MIT License
17 stars 7 forks source link

Ask: can it support for mobile (android/ios) ? #14

Closed Akayashi closed 3 years ago

Akayashi commented 3 years ago

work great with pc, but can it support for mobile platform?

Skurdt commented 3 years ago

not currently

Akayashi commented 3 years ago

thanks you for reply! it can't be support for mobile or you just not do it yet?

Skurdt commented 3 years ago

I haven't got around to try and figure out how to manage files (create folders, files, etc..) on mobile yet. The code for running the games should work has-is though.

Akayashi commented 3 years ago

its true, hard to manage file on mobile (android). I've stuck a week when trying to load core in Plugins folder T_T

Skurdt commented 3 years ago

I know I can put the files in the unity project (in plugins folder) and they'll be copied when building. Then map the functions using the DllImport attribute. But ideally I would prefer being able to download the cores dynamically, and load them with native os functions (like dlopen) like it's working on desktop (not sure if it's possible but that's the ideal scenario...).

Akayashi commented 3 years ago

sound a good idea. I indeed stuck at DllImport attribute, on some android devices (android 7.1 - api level 25) library "libdl" was not found (maybe that was a bug). Then download core is a good idea, but core dynamically is the core download from http://buildbot.libretro.com/nightly, right?

Skurdt commented 3 years ago

Downloading is already supported in the unity editor, the code for it did work at runtime at some point but I removed it from the library code. I'd rather let the library's consumer deal with cores (for future compatibility). Now by downloading, I mean be able to place .so files anywhere I want in the app's filesystem space. As well as create folders and files for core options and save directories. I have no experience in android development, that's the main reason I haven't spend any time porting the code. It's also very low in my priority list (well, not that low since I may want to run this on the oculus quest 2... but yeah, still low priority).

Akayashi commented 3 years ago

thanks you! i'd try that idea.