Porting RetoArch to UWP is also a huge undertaking, given all the features it contains.
At first glance (and I mean it, this is what I know about the UWP app model combined with glancing at the RetroArch source - I may be wrong), some of the big issues weād need to find a solution for are:
- Plugins donāt work the same way: you canāt just execute binaries you acquire after installation - RetroArch does just that to load cores
- Networking: what API are you using for network communication? If not Winsock, Iām afraid weād need to rewrite the network stack
- Rendering: are you rendering RetroArchās UI using DirectX? OpenGL? Vulkan? To make RetroArch work in UWP we basically need to render to a SwapChainPanel, even if we donāt want to use XAML for the UI.
RetroArch would also need to change UI patterns to accomodate being run in a sandbox: instead of browsing through the file system using the built-in UI, weād need to display the OSās native file open window, as that is the only way an app is allowed to access locations outside the sandbox.
This is a feature, not a bug, since itās how you guarantee the user is actually giving consent to the app to access a resource.
Quite honestly, I donāt think Iām up to the task of tackling all of the above and more.
This in addition to the fundamental issue, the one which prevents the Libretro ecosystem as a whole instead of just RetroArch from running in UWP or other similarly sandboxed environments: file access while running in the sandbox.
Right now cores expect to be able to access arbitrary locations on the file system, which is not possible when running sandboxed (this is not UWP specific, sandboxing in MacOS works the same way). They take the gameās path from retro_load_game
and fopen
etc. on their merry way.
The cleanest way I see of solving this is to augment the Libretro API to have file access brokered by the front end, which is what I needed to do to get my app working.
How about we work together on clearing the file access sandboxing issue, which is work that would be needed for a RetroArch UWP port (or to enable sandboxing in MacOS) anyways?