diff options
author | Johannes Schickel | 2012-06-16 02:18:01 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-06-16 02:18:01 +0200 |
commit | 31880186e1c78023e2e552a7fceaa27c3d2d08b1 (patch) | |
tree | 08f62b1b8d032a490e1d3d63f33814ed93785439 /backends/graphics/wincesdl | |
parent | f917db972e0ae7e4e82a6430010a155cbb3a92c0 (diff) | |
download | scummvm-rg350-31880186e1c78023e2e552a7fceaa27c3d2d08b1.tar.gz scummvm-rg350-31880186e1c78023e2e552a7fceaa27c3d2d08b1.tar.bz2 scummvm-rg350-31880186e1c78023e2e552a7fceaa27c3d2d08b1.zip |
BACKENDS: Let copyRectToScreen take a "const void *" instead of "const byte *" as buffer.
This removes the need to convert the parameter to copyRectToScreen to
"const byte *", which is commonly used in games, which use Graphics::Surface
to store their graphics data.
Diffstat (limited to 'backends/graphics/wincesdl')
-rw-r--r-- | backends/graphics/wincesdl/wincesdl-graphics.cpp | 5 | ||||
-rw-r--r-- | backends/graphics/wincesdl/wincesdl-graphics.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index bb79813f3b..2315c582e2 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1071,15 +1071,16 @@ void WINCESdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pit SDL_UnlockSurface(_overlayscreen); } -void WINCESdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { +void WINCESdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); - assert(src); + assert(buf); if (_screen == NULL) return; Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends + const byte *src = (const byte *)buf; /* Clip the coordinates */ if (x < 0) { w += x; diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 7cff8a16d9..26067f0c02 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -75,7 +75,7 @@ public: bool showMouse(bool visible); void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); void unlockScreen(); void blitCursor(); |