From bd296571ff834c8e0b2a20675cd94696fe3a6d14 Mon Sep 17 00:00:00 2001 From: w1z7ard Date: Fri, 14 Sep 2007 20:37:13 +0000 Subject: [PATCH] - removed unneccessary PROJECTM_PRESET_DIR const string - fixed error in print out when preset dir is invalid git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@430 6778bc44-b910-0410-a7a0-be141de4315d --- src/projectM-engine/PresetLoader.hpp | 7 ++++++- src/projectM-engine/projectM.cpp | 17 ++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) 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;