mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-18 20:15:30 +00:00
merge from dev branch (r583:HEAD)
- qprojectM lib, qprojectM-jack added - updates to projectm engine for preset managment / callbacksO git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@630 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -158,11 +158,23 @@ void PresetLoader::handleDirectoryError()
|
||||
}
|
||||
|
||||
|
||||
unsigned int PresetLoader::addPresetURL(const std::string & url) {
|
||||
unsigned int PresetLoader::addPresetURL(const std::string & url, const std::string & presetName) {
|
||||
m_entries.push_back(url);
|
||||
|
||||
/// @bug strip url out of preset name
|
||||
m_presetNames.push_back(url);
|
||||
m_presetNames.push_back(presetName);
|
||||
return m_entries.size()-1;
|
||||
}
|
||||
|
||||
void PresetLoader::removePreset(unsigned int index) {
|
||||
std::vector<std::string>::iterator pos = m_entries.begin();
|
||||
pos += index;
|
||||
m_entries.erase(pos);
|
||||
m_presetNames.erase(pos);
|
||||
}
|
||||
|
||||
const std::string & PresetLoader::getPresetURL ( unsigned int index) const {
|
||||
return m_entries[index];
|
||||
}
|
||||
|
||||
const std::string & PresetLoader::getPresetName ( unsigned int index) const {
|
||||
return m_presetNames[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user