Explorar el Código

Make sound decoder selection based on extension case-insensitive (issue #662)

Bart van Strien hace 12 años
padre
commit
2ad7562e6b
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/modules/sound/lullaby/Sound.cpp

+ 3 - 0
src/modules/sound/lullaby/Sound.cpp

@@ -20,6 +20,8 @@
 
 
 #include "common/config.h"
 #include "common/config.h"
 
 
+#include <algorithm>
+
 #include "Sound.h"
 #include "Sound.h"
 
 
 #include "ModPlugDecoder.h"
 #include "ModPlugDecoder.h"
@@ -57,6 +59,7 @@ const char *Sound::getName() const
 sound::Decoder *Sound::newDecoder(love::filesystem::FileData *data, int bufferSize)
 sound::Decoder *Sound::newDecoder(love::filesystem::FileData *data, int bufferSize)
 {
 {
 	std::string ext = data->getExtension();
 	std::string ext = data->getExtension();
+	std::transform(ext.begin(), ext.end(), ext.begin(), tolower);
 
 
 	sound::Decoder *decoder = 0;
 	sound::Decoder *decoder = 0;