From b51f2f3212ae8a5abbdce4d947ec2d1cad1a0b6f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Jun 2007 22:39:59 +0000 Subject: Implemented the OSystem framebuffer API, as discussed on scummvm-devel. All changes are just fine, and won't cause any compile problems or regressions, despite the fact that I can't test most of the non-SDL backend changes, at an improbability level of two to the power of two hundred and seventy-six thousand to one against - possibly much higher. Anything you still can't cope with is therefore your own problem. Please relax. svn-id: r27548 --- engines/scumm/gfx.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'engines/scumm/gfx.cpp') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index dd7a23d0cf..3547986ce3 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1146,12 +1146,11 @@ void ScummEngine::moveScreen(int dx, int dy, int height) { if ((dx == 0 && dy == 0) || height <= 0) return; - Graphics::Surface screen; - assert(_system->grabRawScreen(&screen)); - - screen.move(dx, dy, height); - _system->copyRectToScreen((byte *)screen.pixels, screen.pitch, 0, 0, screen.w, screen.h); - screen.free(); + Graphics::Surface *screen = _system->lockScreen(); + if (!screen) + return; + screen->move(dx, dy, height); + _system->unlockScreen(); } void ScummEngine_v5::clearFlashlight() { -- cgit v1.2.3