aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/dc')
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/display.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index ffe003ea1d..95cb88c44b 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -127,7 +127,7 @@ public:
// Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap
- void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
+ void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index e4e9a94ec8..264b86646c 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -260,7 +260,7 @@ void OSystem_Dreamcast::initSize(uint w, uint h, const Graphics::PixelFormat *fo
_devpoll = Timer();
}
-void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int y,
+void OSystem_Dreamcast::copyRectToScreen(const void *buf, int pitch, int x, int y,
int w, int h)
{
if (w<1 || h<1)
@@ -269,10 +269,11 @@ void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int
x<<=1; w<<=1;
}
unsigned char *dst = screen + y*SCREEN_W*2 + x;
+ const byte *src = (const byte *)buf;
do {
- memcpy(dst, buf, w);
+ memcpy(dst, src, w);
dst += SCREEN_W*2;
- buf += pitch;
+ src += pitch;
} while (--h);
_screen_dirty = true;
}