diff options
Diffstat (limited to 'engines/mohawk/bitmap.cpp')
-rw-r--r-- | engines/mohawk/bitmap.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp index c8111fa91b..63b29053b0 100644 --- a/engines/mohawk/bitmap.cpp +++ b/engines/mohawk/bitmap.cpp @@ -135,8 +135,12 @@ Common::Array<MohawkSurface *> MohawkBitmap::decodeImages(Common::SeekableReadSt Graphics::Surface *MohawkBitmap::createSurface(uint16 width, uint16 height) { Graphics::Surface *surface = new Graphics::Surface(); - byte bytesPerPixel = (getBitsPerPixel() <= 8) ? 1 : g_system->getScreenFormat().bytesPerPixel; - surface->create(width, height, bytesPerPixel); + Graphics::PixelFormat format; + if (getBitsPerPixel() <= 8) + format = Graphics::PixelFormat::createFormatCLUT8(); + else + format = g_system->getScreenFormat(); + surface->create(width, height, format); return surface; } |