mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
IMAGE: Fix calling JPEGDecoder::getPixelFormat() before loading the frame
This commit is contained in:
committed by
Filippos Karapetis
parent
1a3a290ce7
commit
f60a41b244
+3
-1
@@ -83,7 +83,9 @@ void JPEGDecoder::setCodecAccuracy(CodecAccuracy accuracy) {
|
||||
}
|
||||
|
||||
Graphics::PixelFormat JPEGDecoder::getPixelFormat() const {
|
||||
return _surface.format;
|
||||
if (_surface.getPixels())
|
||||
return _surface.format;
|
||||
return _requestedPixelFormat;
|
||||
}
|
||||
|
||||
#ifdef USE_JPEG
|
||||
|
||||
Reference in New Issue
Block a user