diff options
author | Cameron Cawley | 2019-03-31 12:37:37 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-03-31 15:03:09 +0300 |
commit | 62fc4c94bfd5b66fbfa444d686c5e86a84bea562 (patch) | |
tree | 5afe86bfb8af3fb4ae2b196e0eba36b8d7b1a2d0 /backends/graphics/surfacesdl | |
parent | b195ff5e190388f8598a7db4822d57f73f4b6b65 (diff) | |
download | scummvm-rg350-62fc4c94bfd5b66fbfa444d686c5e86a84bea562.tar.gz scummvm-rg350-62fc4c94bfd5b66fbfa444d686c5e86a84bea562.tar.bz2 scummvm-rg350-62fc4c94bfd5b66fbfa444d686c5e86a84bea562.zip |
SDL: Fix compilation without 16 bit colour support
Diffstat (limited to 'backends/graphics/surfacesdl')
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 22db3bd5e3..304848ed4c 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -469,6 +469,14 @@ OSystem::TransactionError SurfaceSdlGraphicsManager::endGFXTransaction() { return (OSystem::TransactionError)errors; } +Graphics::PixelFormat SurfaceSdlGraphicsManager::convertSDLPixelFormat(SDL_PixelFormat *in) const { + return Graphics::PixelFormat(in->BytesPerPixel, + 8 - in->Rloss, 8 - in->Gloss, + 8 - in->Bloss, 8 - in->Aloss, + in->Rshift, in->Gshift, + in->Bshift, in->Ashift); +} + #ifdef USE_RGB_COLOR Common::List<Graphics::PixelFormat> SurfaceSdlGraphicsManager::getSupportedFormats() const { assert(!_supportedFormats.empty()); @@ -492,14 +500,6 @@ static void maskToBitCount(Uint32 mask, uint8 &numBits, uint8 &shift) { } #endif -Graphics::PixelFormat SurfaceSdlGraphicsManager::convertSDLPixelFormat(SDL_PixelFormat *in) const { - return Graphics::PixelFormat(in->BytesPerPixel, - 8 - in->Rloss, 8 - in->Gloss, - 8 - in->Bloss, 8 - in->Aloss, - in->Rshift, in->Gshift, - in->Bshift, in->Ashift); -} - void SurfaceSdlGraphicsManager::detectSupportedFormats() { _supportedFormats.clear(); |