diff options
author | Willem Jan Palenstijn | 2013-04-18 23:34:29 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:39:44 +0200 |
commit | 01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6 (patch) | |
tree | 544b07f3aa41abe7907bcd2040cdad11ebc324bb /graphics/scaler.cpp | |
parent | 9cf2c83e5e5a35816ab153bf8443dac691829ea8 (diff) | |
parent | a41d72a44a660c72fdadbc3a8ef580e5e03cb890 (diff) | |
download | scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.gz scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.bz2 scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.zip |
Merge branch 'master'
Diffstat (limited to 'graphics/scaler.cpp')
-rw-r--r-- | graphics/scaler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index a35fb9046e..9ade0e6c57 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -24,6 +24,7 @@ #include "graphics/scaler/scalebit.h" #include "common/util.h" #include "common/system.h" +#include "common/textconsole.h" int gBitFormat = 565; @@ -90,6 +91,9 @@ void InitLUT(Graphics::PixelFormat format) { if (RGBtoYUV == 0) RGBtoYUV = (uint32 *)malloc(65536 * sizeof(uint32)); + if (!RGBtoYUV) + error("[InitLUT] Cannot allocate memory for YUV/LUT buffers"); + for (int color = 0; color < 65536; ++color) { format.colorToRGB(color, r, g, b); Y = (r + g + b) >> 2; |