| Summary: | Mac: dropping a file onto the app to launch it doesn't pass the filepath to argv | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | events | Assignee: | (disabled) Jørgen Tjernø <jorgen> |
| Status: | RESOLVED WONTFIX | QA Contact: | (disabled) Jørgen Tjernø <jorgen> |
| Severity: | minor | ||
| Priority: | P2 | CC: | slouken |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X 10.8 | ||
|
Description
Alex Szpakowski
2013-05-27 19:02:49 UTC
FYI, SDL_DROPFILE should be enabled by default now. Can you confirm in the latest snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip Indeed, it is enabled by default now - drop-to-open for an SDL2 application now successfully puts the SDL_DROPFILE event in the queue. :) Now that SDL_DROPFILE is enabled by default, I guess developers using SDL 2 have to be more careful to either always handle the heap memory allocated by SDL_DROPFILE or disable the event, if they don't want potential (small) memory leaks. Yep. :) Since we are no longer wrapping main() on OS X, we can't pass the initial dropped file into the command line. Ideally on Windows and Linux we would be able to detect that an argument was generated via a file drop and convert them into a SDL_DROPFILE event, but I don't know of any way to do that. Portable applications that want to handle file drops should handle command line parameters as well as the SDL_DROPFILE event. Fair enough. Thanks! Just a quick note - the comments for the SDL_DropEvent struct in SDL_events.h haven't been updated to reflect the new changes, they still say the event is disabled by default. |