SCI: Prefer getBasePtr over direct Surface::pixels access.
This commit is contained in:
parent
8617edea04
commit
dd67e9f099
6 changed files with 11 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue