Adding file/folder drop support & MacOS build fixes #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted a good first issue to acquaint myself with this project, and since one of the frustrating parts of the build/install process was figuring out how to load presets, I figured adding good drag & drop support would be useful (as per issue #84).
SDL provides the drop event, so the implementation was fairly straightforward. The user can either drag & drop a preset file (or collection of preset files), or a folder containing presets. Preset files are files that end with '.milk' or '.prjm' (haven't seen or used prjm files but they are listed as supported in the projectM code). Dragging a file will immediately enqueue it on the next spot in the playlist, and dragging a folder will enqueue all presets in the folder (searched recursively).
I also added two configuration options to give more control to the user (split into a separate commit, as I had to add an additional include on the RenderLoop to access the configuration settings). There are now two additional UI/CLI settings:
Resolves #84
Additionally, as I have been developing on MacOS 15, I have made some fixes to get this software building correctly. I updated the GLSL version to from 130 to 150 to fix the issue with the GUI not displaying on MacOS, added some build logic for finding & including the projectM libraries within the resulting .app file, and a (hopefully universal) fix for utf8proc being not found during the build process. I also updated the C++ version from 14 to 17 to fix issues with Poco as poco v1.13+ requires C++ 17 (this may be controversial, but this can be overwritten easily back to C++ 14 if necessary, although I would update the readme to include this information).
EDIT:
I realized it was not a great idea to group these two changes together, so I'm closing this PR and opening two separate ones instead.