From 0f9583e4ca7069b5a978ef52c97426072c93e2f4 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 18 Sep 2016 13:44:20 +0200 Subject: SDL: Make sure the cloud icon is cleared immediatly after it is hidden --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends/graphics/surfacesdl') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index cd89440929..adb84bfb24 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -2175,6 +2175,12 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends + if (_osdIconSurface && !icon) { + // Add a dirty rect to clear the icon on the next update + SDL_Rect dstRect = getOSDIconRect(); + addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true); + } + if (_osdIconSurface) { SDL_FreeSurface(_osdIconSurface); _osdIconSurface = nullptr; -- cgit v1.2.3