aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-05 10:56:43 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit91f75efa99ffe6d1c4e8e9b9b1fec368af192b7d (patch)
treec408d35f2713bd45349a3946c0f7b969dcd45f7b /backends/graphics
parent5a695040d8cbd4e840e7c21e415d2225f9318ea2 (diff)
downloadscummvm-rg350-91f75efa99ffe6d1c4e8e9b9b1fec368af192b7d.tar.gz
scummvm-rg350-91f75efa99ffe6d1c4e8e9b9b1fec368af192b7d.tar.bz2
scummvm-rg350-91f75efa99ffe6d1c4e8e9b9b1fec368af192b7d.zip
GUI: Fix copyRectOnOSD()
Now it doesn't require full redraw, but asks to redraw the area which is copied to.
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index b76b2c7691..b4b0d33b85 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2223,6 +2223,9 @@ void SurfaceSdlGraphicsManager::copyRectToOSD(const void *buf, int pitch, int x,
if (SDL_LockSurface(_osdSurface))
error("displayMessageOnOSD: SDL_LockSurface failed: %s", SDL_GetError());
+ // Mark that area as "dirty"
+ addDirtyRect(x, y, w, h, true);
+
#ifdef USE_RGB_COLOR
byte *dst = (byte *)_osdSurface->pixels + y * _osdSurface->pitch + x * _osdSurface->format->BytesPerPixel;
if (_videoMode.screenWidth == w && pitch == _osdSurface->pitch) {
@@ -2251,9 +2254,6 @@ void SurfaceSdlGraphicsManager::copyRectToOSD(const void *buf, int pitch, int x,
// Finished drawing, so unlock the OSD surface again
SDL_UnlockSurface(_osdSurface);
-
- // Ensure a full redraw takes place next time the screen is updated
- _forceFull = true;
}
void SurfaceSdlGraphicsManager::clearOSD() {