aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 01:40:57 +0200
committerJohannes Schickel2013-08-03 04:02:49 +0200
commitb7706acb4107b6dd6b562062f1d20720e0560f9e (patch)
tree80215ac518a6e9c5cf27bc24e565cfbe7488a2b5
parent3169e070135ed06b7f5c5e8ad60c088e4cbd496f (diff)
downloadscummvm-rg350-b7706acb4107b6dd6b562062f1d20720e0560f9e.tar.gz
scummvm-rg350-b7706acb4107b6dd6b562062f1d20720e0560f9e.tar.bz2
scummvm-rg350-b7706acb4107b6dd6b562062f1d20720e0560f9e.zip
SDL: Prefer getBasePtr over direct Surface::pixels access.
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index a2e1981e79..e36e43b05e 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1340,8 +1340,8 @@ void SurfaceSdlGraphicsManager::unlockScreen() {
void SurfaceSdlGraphicsManager::fillScreen(uint32 col) {
Graphics::Surface *screen = lockScreen();
- if (screen && screen->pixels)
- memset(screen->pixels, col, screen->h * screen->pitch);
+ if (screen && screen->getBasePtr(0, 0))
+ memset(screen->getBasePtr(0, 0), col, screen->h * screen->pitch);
unlockScreen();
}