Lots of interconnected changes in this commit:
- Removed unnecessary name/author/filename members all over the place.
- Started using exceptions to deliver preset loading and rendering errors to the topmost ProjectM class.
- Added stream loading methods to factories and the base Preset class.
- Added new events for requesting preset switch and telling the user about loading errors.
- Consolidated preset switching logic in ProjectM class a bit.
Mainly two problems:
- MilkdropPresetFactory deleted a private reference-typed member in MilkdropPreset. Changed this into a plain pointer which is now checked and properly cleaned up.
- In the library interface class, projectM, the active preset pointers were not deleted before the factors, which lead to a use-after-free when the presets tried to dereference the factory pointer.
Scanning textures/presets dirs for textures and scanning preset dir for presets.
Scanning is now done recursively, so presets and textures can be organized into subdirectories instead of needing to be flattened into a single directory.
On POSIX systems makes use of [ftw](https://linux.die.net/man/3/ftw) which should be relatively efficient. Otherwise falls back to recursing with `dirent` (for windows).
Probably should have made an autoconf check for `ftw` instead of doing `#ifdef WIN32`.
* Scan subdirectories in presets directory
* remove preset subdir config
* Recursively scan for textures too, add c++-17 compatibility
* Refactor directory scanning code so it's reused by texture loader and preset loader. Make cross-platform (maybe)
* filescanner in makefile
* extension filter for file loader
* make extensions match up'
* need string.h
* Add FileScanner.cpp to win build (maybe)
* scan all dirs
* #ifndef #ifdef is def fun
* bogus comment
* bleh
* bleh
* itunes plugin with c++17
* EyeTunes needs to know about the FileScanner
Co-authored-by: milkdropper.com <milkdropper.com@gmail.com>
Co-authored-by: milkdropper <59471060+milkdropper@users.noreply.github.com>
created matching allocate/release methods for PresetOutput, so there is no implicit dependency on behavior between projectM::switchPreset() and MilkdropPresetFactory::allocate()