projectM-visualizer / frontend-sdl-cpp

Standalone application based on libSDL that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL.
GNU General Public License v3.0
66 stars 35 forks source link

Allow presetPath to contain a name of the file #54

Open tari3x opened 1 year ago

tari3x commented 1 year ago

In a somewhat recent version of the UI I was able to submit a preset filename as presetPath which would open the given preset. In the current tip this results in a crash, Is there some other way to just load a specific preset?

 /home/avatar/bin/projectMSDL.exe --presetPath="./Fractal/Nested Circle/LuX - Heavy Acid Trip 3.milk" 
Recording audio from device "Default capturing device" (ID -1).
Opened audio recording device "System default capturing device" (ID -1) with 2 channels at 44100 Hz.
Null pointer: path in file "./Foundation/src/Path.cpp", line 64
tari3x commented 1 year ago

To be more precise, pressing "r" does nothing and pressing space results in the crash.

kblaschke commented 1 year ago

While it should not crash (will fix that), the presetPath option currently doesn't support single files, as it's interpreted as a directory.

Absolutely makes sense to check if the given path is a file or directory and add it accordingly, will put it on the to-do list.

Plus, in the currently WIP UI overhaul, it'll be possible to create individual playlists containing any number of preset files in a specific order and also load a playlist on startup.

tari3x commented 1 year ago

Thanks!

It definitely used to work, even if not intentionally.