Use case insensitive lookup when removing invalid sound drivers, the same lookup used when creating the sound driver. Change ffmpeg fetching to fetch from stepmania's mirror because ffmpeg.org moved theirs.

This commit is contained in:
Kyzentun Keeslala
2016-08-04 16:57:31 -06:00
parent d215dd99a0
commit 832fd0e1b6
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
else() else()
# --shlibdir=$our_installdir/stepmania-$VERSION # --shlibdir=$our_installdir/stepmania-$VERSION
externalproject_add("ffmpeg" externalproject_add("ffmpeg"
DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://source.ffmpeg.org/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}" DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://github.com/stepmania/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}" CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}"
BUILD_COMMAND "${SM_FFMPEG_MAKE}" BUILD_COMMAND "${SM_FFMPEG_MAKE}"
UPDATE_COMMAND "" UPDATE_COMMAND ""
+2 -3
View File
@@ -18,13 +18,12 @@ RageSoundDriver *RageSoundDriver::Create( const RString& drivers )
else else
{ {
split(drivers, ",", drivers_to_try); split(drivers, ",", drivers_to_try);
vector<RString> default_drivers;
split(DEFAULT_SOUND_DRIVER_LIST, ",", default_drivers);
size_t to_try= 0; size_t to_try= 0;
bool had_to_erase= false; bool had_to_erase= false;
while(to_try < drivers_to_try.size()) while(to_try < drivers_to_try.size())
{ {
if(std::find(default_drivers.begin(), default_drivers.end(), drivers_to_try[to_try]) == default_drivers.end()) if(m_pDriverList.m_pRegistrees->find(istring(drivers_to_try[to_try]))
== m_pDriverList.m_pRegistrees->end())
{ {
LOG->Warn("Removed unusable sound driver %s", drivers_to_try[to_try].c_str()); LOG->Warn("Removed unusable sound driver %s", drivers_to_try[to_try].c_str());
drivers_to_try.erase(drivers_to_try.begin() + to_try); drivers_to_try.erase(drivers_to_try.begin() + to_try);