aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-02-24 21:53:13 +0100
committerdhewg2011-02-24 23:18:34 +0100
commitc8551b80dd917c35d367c1f15f4b9c2618da3684 (patch)
tree61bae42aeb7213ce04776ed3a1e1c57fab7dfc74
parenta636d41ca8c066adfed4fd16d9a2e46de5fab871 (diff)
downloadscummvm-rg350-c8551b80dd917c35d367c1f15f4b9c2618da3684.tar.gz
scummvm-rg350-c8551b80dd917c35d367c1f15f4b9c2618da3684.tar.bz2
scummvm-rg350-c8551b80dd917c35d367c1f15f4b9c2618da3684.zip
GUI: Properly clear the screen buffer
Don't operate on the overlay, it might be a pointer to a texture used by the hardware. This get's rid of some annoying flickers on androids
-rw-r--r--gui/ThemeEngine.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index ee83ca620c..356ed0ff90 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -421,10 +421,9 @@ bool ThemeEngine::init() {
}
void ThemeEngine::clearAll() {
- if (_initOk) {
- _system->clearOverlay();
- _system->grabOverlay((OverlayColor *)_screen.pixels, _screen.w);
- }
+ if (_initOk)
+ memset(_screen.pixels, _overlayFormat.RGBToColor(0, 0, 0),
+ _screen.w * _screen.h * sizeof(uint16));
}
void ThemeEngine::refresh() {