From d1fa1154fe5758fe48928062ff9b43d1bcfc7770 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sat, 9 Nov 2019 14:52:05 +0000 Subject: BACKENDS: Fix using fillScreen in non-paletted screen modes --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.cpp') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 3b2e3eaf6f..7cddd4443f 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1610,8 +1610,8 @@ void SurfaceSdlGraphicsManager::unlockScreen() { void SurfaceSdlGraphicsManager::fillScreen(uint32 col) { Graphics::Surface *screen = lockScreen(); - if (screen && screen->getPixels()) - memset(screen->getPixels(), col, screen->h * screen->pitch); + if (screen) + screen->fillRect(Common::Rect(screen->w, screen->h), col); unlockScreen(); } -- cgit v1.2.3