projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.39k stars 375 forks source link

Allow setting separate texture dir #624

Closed kblaschke closed 2 years ago

kblaschke commented 2 years ago

This set of changes allows library users to set an additional texture search path besides the user preset dir and the (still hard-coded) dataPath/presets and dataPath/textures directories.

This will allow users to set a specific texture path (e.g. with user-provided images), while the preset dir can be changed to anything and doesn't need to contain any textures. The search order - if all paths are set - is now:

  1. User preset dir (preset textures should override the base files)
  2. User texture dir (user textures should override system textures)
  3. System/application data dir, subdir "presets"
  4. System/application data dir, subdir "textures"

It could be a good idea to turn both user preset and textures paths into lists, so the user might add more than one dir if wanted. Please comment if you find this to be an improvement worth implementing.

kblaschke commented 2 years ago

Fixes #616

revmischa commented 2 years ago

This fixed my issue 👍🏻