From 91f75efa99ffe6d1c4e8e9b9b1fec368af192b7d Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Sun, 5 Jun 2016 10:56:43 +0600 Subject: GUI: Fix copyRectOnOSD() Now it doesn't require full redraw, but asks to redraw the area which is copied to. --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/graphics') 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() { -- cgit v1.2.3