aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-07-21 13:30:47 +0200
committerWillem Jan Palenstijn2016-07-21 13:30:47 +0200
commit6f001d831623a46f643379554d20e94463d8c2f1 (patch)
tree901caa296592814b48a98ac2e3d381331c5a7821 /graphics/scaler
parent75fdd1504de98c7c6937344877685bfef6514344 (diff)
parent5f301b24002fffb3e8e05061a92ae2e0ee3a92ec (diff)
downloadscummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.tar.gz
scummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.tar.bz2
scummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.zip
Merge branch 'master' into titanic
Diffstat (limited to 'graphics/scaler')
-rw-r--r--graphics/scaler/thumbnail_intern.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index 65e327f9c2..78fb7828d7 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -171,7 +171,8 @@ static bool grabScreen565(Graphics::Surface *surf) {
if (!screen)
return false;
- assert(screen->format.bytesPerPixel == 1 || screen->format.bytesPerPixel == 2);
+ assert(screen->format.bytesPerPixel == 1 || screen->format.bytesPerPixel == 2
+ || screen->format.bytesPerPixel == 4);
assert(screen->getPixels() != 0);
Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
@@ -197,6 +198,9 @@ static bool grabScreen565(Graphics::Surface *surf) {
} else if (screenFormat.bytesPerPixel == 2) {
uint16 col = READ_UINT16(screen->getBasePtr(x, y));
screenFormat.colorToRGB(col, r, g, b);
+ } else if (screenFormat.bytesPerPixel == 4) {
+ uint32 col = READ_UINT32(screen->getBasePtr(x, y));
+ screenFormat.colorToRGB(col, r, g, b);
}
*((uint16 *)surf->getBasePtr(x, y)) = Graphics::RGBToColor<Graphics::ColorMasks<565> >(r, g, b);