From 31880186e1c78023e2e552a7fceaa27c3d2d08b1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:18:01 +0200 Subject: 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. --- backends/graphics/wincesdl/wincesdl-graphics.cpp | 5 +++-- backends/graphics/wincesdl/wincesdl-graphics.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'backends/graphics/wincesdl') 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(); -- cgit v1.2.3