diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 51f63a364aa..e5d8ba4fbc8 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -128,7 +128,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { errors |= kTransactionPixelFormatNotSupported; _videoMode.format = _oldVideoMode.format; - _screenFormat = getPixelFormat(_videoMode.format); + _screenFormat = _videoMode.format; #endif } else if (_videoMode.screenWidth != _oldVideoMode.screenWidth || _videoMode.screenHeight != _oldVideoMode.screenHeight) { errors |= kTransactionSizeChangeFailed; @@ -362,7 +362,7 @@ Graphics::ColorMode OSystem_SDL::findCompatibleFormat(Common::ListfindCompatibleFormat(formatList); debug("%X",format); //TODO: set up the pixelFormat here - g_system->initFormat(format); + g_system->initFormat(g_system->getPixelFormat(format)); #endif g_system->initSize(width, height); diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index d37a7794f41..fa5925b1f9f 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -44,15 +44,15 @@ namespace Graphics { * to get the applicable color order. */ enum ColorMode { - kFormatCLUT8 = 0, + kFormatCLUT8 = 0, //256 color palette. kFormatRGB555 = 1, - kFormatRGB556 = 2, // 6 bits for blue, in case this ever happens + kFormatXRGB1555 = 2, // Special case, high bit has special purpose, which may be alpha. + // Engines should probably handle this bit internally and pass RGB only, though kFormatRGB565 = 3, - kFormatRGB655 = 4, // 6 bits for red, in case this ever happens - kFormatRGBA4444 = 5, - kFormatRGB888 = 6, - kFormatRGBA6666 = 7, // I've never heard of this, but it's theoretically possible - kFormatRGBA8888 = 8 + kFormatRGBA4444 = 4, // since this mode is commonly supported in game hardware, some unimplemented engines may use it? + kFormatRGB888 = 5, + kFormatRGBA6666 = 6, // I've never heard of this, but it's vaguely plausible + kFormatRGBA8888 = 7 }; #endif