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

SDL: Add drag&drop support #512

Merged
merged 5 commits into from
Nov 1, 2023

Conversation

Yanrishatum
Copy link
Contributor

  • Add handling of drag&drop events from SDL
  • Add flag to enable and disable drag&drop.

It seems SDL have drag&drop enabled by default, and master branch have a memory leak every time someone drops a file onto the window because SDL also expects user to manually free the dropped file contents.

Related: HeapsIO/heaps#1043

@Yanrishatum
Copy link
Contributor Author

@ncannasse
We'd really like to get that merged. This PR is primarily for development, because we do not use HIDE (for many, MANY reasons) and make our own editing tools using Imgui. And being unable to drag&drop files is a massive inconvenience for the development (along with #559 ).

This touched up explicitly only for SDL, because getting Drag&Drop working on DX is much more involved, and we're fine with using only SDL for development. I will revise the Heaps integration of Drag&Drop PR after this PR is merged so I can properly test it.

@ncannasse
Copy link
Member

Could you add @:native("?sdl","xxxxx") in front of the new functions on haxe side so that someone that compiles with the new header but with the old binaries will be able to run their program as long as they don't use them ? once done I can merge, no pb.

@Yanrishatum
Copy link
Contributor Author

Done.

@ncannasse ncannasse merged commit d7a6ede into HaxeFoundation:master Nov 1, 2023
9 checks passed
@ncannasse
Copy link
Member

Thanks

@Yanrishatum Yanrishatum deleted the feature_sdl_drag_drop branch November 1, 2023 14:36
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