Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland: Open content from drag and drop #16443

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ColinKinloch
Copy link
Contributor

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

@LibretroAdmin
Copy link
Contributor

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.

@gouchi
Copy link
Member

gouchi commented Apr 18, 2024

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 ?

@ColinKinloch ColinKinloch mentioned this pull request Dec 29, 2024
9 tasks
@ColinKinloch ColinKinloch force-pushed the wl_dnd_open_content branch 2 times, most recently from 7a1f259 to f308a9a Compare December 29, 2024 21:44
@ColinKinloch
Copy link
Contributor Author

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.

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.

3 participants