SCI: Prefer getBasePtr over direct Surface::pixels access.

This commit is contained in:
Johannes Schickel 2013-08-03 00:40:03 +02:00
parent 8617edea04
commit dd67e9f099
6 changed files with 11 additions and 11 deletions

View file

@ -170,14 +170,14 @@ void GfxScreen::copyToScreen() {
void GfxScreen::copyFromScreen(byte *buffer) {
// TODO this ignores the pitch
Graphics::Surface *screen = g_system->lockScreen();
memcpy(buffer, screen->pixels, _displayPixels);
memcpy(buffer, screen->getBasePtr(0, 0), _displayPixels);
g_system->unlockScreen();
}
void GfxScreen::kernelSyncWithFramebuffer() {
// TODO this ignores the pitch
Graphics::Surface *screen = g_system->lockScreen();
memcpy(_displayScreen, screen->pixels, _displayPixels);
memcpy(_displayScreen, screen->getBasePtr(0, 0), _displayPixels);
g_system->unlockScreen();
}