RetroArch
RetroArch copied to clipboard
wayland: Open content from drag and drop
Description
- How should I trigger retroarch to load content from a file?
- How should I convert a
file://uri to a path?
I copied most of the wayland_load_content_from_drop from the win32 backend.
This freezes retroarch in some cases and segfaults in others.
I don't have time to look into this. I assumed task_push_load_content... would queue this task to trigger at the correct time but this isn't the case.
It would be great if someone could point me in the right direction.
The other issue is whether there is a better option for decoding file:// urls.
Related Issues
Related Pull Requests
Reviewers
This is a very interesting PR, we've been wanting drag and drop support for a while now.
I guess once it's implemented for Wayland we can prob try orienting how to implement it for the various other OSes and then try to create some kind of common rules around drag and drop behavior for the RetroArch window. This could potentially be huge for UX reasons.
I don't have time to look into this. I assumed task_push_load_content... would queue this task to trigger at the correct time but this isn't the case.
Not sure if this commit could shed some light ?
This now works.
It stores the dropped path and changes core during the main loop in retroarch.c, just before the ui companion code that it's taken from runs.
I'm not sure if this is the correct way of doing this.
Also comparing RARCH_PATH_CONTENT to RARCH_PATH_NEXT_CONTENT is probably redundant, just triggering the content change when RARCH_PATH_NEXT_CONTENT is set is probably simpler.