diff --git a/src/projectM-engine/PresetLoader.hpp b/src/projectM-engine/PresetLoader.hpp index a23571367..3e3b079ab 100644 --- a/src/projectM-engine/PresetLoader.hpp +++ b/src/projectM-engine/PresetLoader.hpp @@ -35,7 +35,12 @@ class PresetLoader { /** Sets the directory where the loader will search for files */ void setScanDirectory(std::string pathname); - + + /// Returns the directory path associated with this preset chooser + inline const std::string & directoryName() const { + return m_dirname; + } + /** Rescans the active preset directory */ void rescan(); diff --git a/src/projectM-engine/projectM.cpp b/src/projectM-engine/projectM.cpp index 28c53dac2..8921ee199 100755 --- a/src/projectM-engine/projectM.cpp +++ b/src/projectM-engine/projectM.cpp @@ -56,19 +56,6 @@ #include "ConfigFile.h" #include "TextureManager.hpp" -#ifdef LINUX -const std::string projectM::PROJECTM_PRESET_PATH ( "/usr/share/projectM/presets/" ); -#endif - -#ifdef MACOS -const std::string projectM::PROJECTM_PRESET_PATH ( "/usr/share/projectM/presets/" ); -#endif - - -#ifdef WIN32 -const std::string projectM::PROJECTM_PRESET_PATH ( "C:\\Program Files\\ProjectM\\presets" ); -#endif - /** Stash current engine */ projectM *projectM::currentEngine = NULL; @@ -850,8 +837,8 @@ int projectM::initPresetTools() // Case where no valid presets exist in directory if (m_presetChooser->empty()) { - std::cerr << "[projectM] warning: no valid files found in preset directory \"" - << PROJECTM_PRESET_PATH << "\"" << std::endl; + std::cerr << "[projectM] warning: no valid files found in preset directory \"" + << m_presetLoader->directoryName() << "\"" << std::endl; } std::cerr << "[projectM] Idle preset allocated." << std::endl;