diff options
author | Einar Johan Trøan Sømåen | 2012-07-18 16:42:52 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-18 16:42:52 +0200 |
commit | bcb32c4e1f9243f18825756bc96a0f1d47b703ac (patch) | |
tree | 0d399a9e3cf567a9d7de8811b11631f3b2d3c887 /engines | |
parent | 6d43745e360c456ffa0e3217822e7c5191bb7eeb (diff) | |
download | scummvm-rg350-bcb32c4e1f9243f18825756bc96a0f1d47b703ac.tar.gz scummvm-rg350-bcb32c4e1f9243f18825756bc96a0f1d47b703ac.tar.bz2 scummvm-rg350-bcb32c4e1f9243f18825756bc96a0f1d47b703ac.zip |
WINTERMUTE: Make Image-decoder-selection case-insensitive
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/Base/BImage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/BImage.cpp index deb0547b3d..337a157536 100644 --- a/engines/wintermute/Base/BImage.cpp +++ b/engines/wintermute/Base/BImage.cpp @@ -71,21 +71,21 @@ CBImage::~CBImage() { ERRORCODE CBImage::loadFile(const Common::String &filename) {
_filename = filename;
-
+ _filename.toLowercase();
if (StringUtil::startsWith(filename, "savegame:", true)) {
_decoder = new Graphics::BitmapDecoder();
- } else if (filename.hasSuffix(".png")) {
+ } else if (_filename.hasSuffix(".png")) {
_decoder = new Graphics::PNGDecoder();
- } else if (filename.hasSuffix(".bmp")) {
+ } else if (_filename.hasSuffix(".bmp")) {
_decoder = new Graphics::BitmapDecoder();
- } else if (filename.hasSuffix(".tga")) {
+ } else if (_filename.hasSuffix(".tga")) {
_decoder = new WinterMute::TGA();
- } else if (filename.hasSuffix(".jpg")) {
+ } else if (_filename.hasSuffix(".jpg")) {
_decoder = new Graphics::JPEGDecoder();
} else {
error("CBImage::loadFile : Unsupported fileformat %s", filename.c_str());
}
-
+ _filename = filename;
Common::SeekableReadStream *file = Game->_fileManager->openFile(filename.c_str());
if (!file) return STATUS_FAILED;
|