diff options
author | Max Horn | 2009-03-19 21:43:27 +0000 |
---|---|---|
committer | Max Horn | 2009-03-19 21:43:27 +0000 |
commit | e59b4587b706bb91b7875b4675cfdcdf68ae493c (patch) | |
tree | 1a77d3e46c254f9e6298dfaac1768b21093ed3f8 /backends/platform/sdl | |
parent | 428b0ec80023361b7079759b5767647d1024be57 (diff) | |
download | scummvm-rg350-e59b4587b706bb91b7875b4675cfdcdf68ae493c.tar.gz scummvm-rg350-e59b4587b706bb91b7875b4675cfdcdf68ae493c.tar.bz2 scummvm-rg350-e59b4587b706bb91b7875b4675cfdcdf68ae493c.zip |
COMMON: Added a new IS_ALIGNED macro (for now using size_t, we can change it if this turns out to be not portable enough. Also added a doxygen comment to the ARRAYSIZE macro
svn-id: r39542
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index b4bf48d808..bf4a1e7794 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -793,7 +793,7 @@ void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int assert(h > 0 && y + h <= _videoMode.screenHeight); assert(w > 0 && x + w <= _videoMode.screenWidth); - if (((long)src & 3) == 0 && pitch == _videoMode.screenWidth && x == 0 && y == 0 && + if (IS_ALIGNED(src, 4) && pitch == _videoMode.screenWidth && x == 0 && y == 0 && w == _videoMode.screenWidth && h == _videoMode.screenHeight && _modeFlags & DF_WANT_RECT_OPTIM) { /* Special, optimized case for full screen updates. * It tries to determine what areas were actually changed, @@ -997,7 +997,7 @@ void OSystem_SDL::makeChecksums(const byte *buf) { void OSystem_SDL::addDirtyRgnAuto(const byte *buf) { assert(buf); - assert(((long)buf & 3) == 0); + assert(IS_ALIGNED(buf, 4)); /* generate a table of the checksums */ makeChecksums(buf); |