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.
This commit is contained in:
parent
f917db972e
commit
31880186e1
27 changed files with 56 additions and 49 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue