diff --git a/engines/private/private.cpp b/engines/private/private.cpp index 0a2f10fcb66..a43c7972dd4 100644 --- a/engines/private/private.cpp +++ b/engines/private/private.cpp @@ -929,8 +929,9 @@ void PrivateEngine::loadImage(const Common::String &name, int x, int y) { //drawScreen(); } -void PrivateEngine::drawScreenFrame(Graphics::Surface *surf) { - surf->copyRectToSurface(*_frame, 0, 0, Common::Rect(0, 0, _screenW, _screenH)); +void PrivateEngine::drawScreenFrame() { + g_system->copyRectToScreen(_frame->getPixels(), _frame->pitch, 0, 0, _screenW, _screenH); + //surf->copyRectToSurface(*_frame, 0, 0, Common::Rect(0, 0, _screenW, _screenH)); } @@ -979,13 +980,13 @@ void PrivateEngine::drawScreen() { delete cframe; } - Graphics::Surface *screen = g_system->lockScreen(); if (_mode == 1) { - drawScreenFrame(screen); + drawScreenFrame(); } - Common::Rect window(_origin->x, _origin->y, _screenW - _origin->x, _screenH - _origin->y); - screen->copyRectToSurface(*surface, _origin->x, _origin->y, window); - g_system->unlockScreen(); + + Common::Rect w(_origin->x, _origin->y, _screenW - _origin->x, _screenH - _origin->y); + Graphics::Surface sa = surface->getSubArea(w); + g_system->copyRectToScreen(sa.getPixels(), sa.pitch, _origin->x, _origin->y, sa.w, sa.h); //if (_image->getPalette() != nullptr) // g_system->getPaletteManager()->setPalette(_image->getPalette(), _image->getPaletteStartIndex(), _image->getPaletteColorCount()); g_system->updateScreen(); diff --git a/engines/private/private.h b/engines/private/private.h index 32bfeb4d40b..f66d7c01032 100644 --- a/engines/private/private.h +++ b/engines/private/private.h @@ -192,7 +192,7 @@ public: void skipVideo(); void loadImage(const Common::String &file, int x, int y); - void drawScreenFrame(Graphics::Surface *); + void drawScreenFrame(); void changeCursor(Common::String); void initCursors();