aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-03-17 19:29:34 +0100
committerdhewg2011-03-17 19:35:58 +0100
commit70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9 (patch)
tree040cfdffae4320c85a4887923e2940eb14bacd55
parent82bcddf8dacb894fe1155ca768df9a072984ef91 (diff)
downloadscummvm-rg350-70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9.tar.gz
scummvm-rg350-70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9.tar.bz2
scummvm-rg350-70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9.zip
ANDROID: Get rid of more gfx glitches
-rw-r--r--backends/platform/android/gfx.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 8a03a19fee..5b03af9698 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -286,6 +286,9 @@ void OSystem_Android::initSize(uint width, uint height,
void OSystem_Android::clearScreen(FixupType type, byte count) {
assert(count > 0);
+ bool sm = _show_mouse;
+ _show_mouse = false;
+
GLCALL(glDisable(GL_SCISSOR_TEST));
for (byte i = 0; i < count; ++i) {
@@ -310,6 +313,9 @@ void OSystem_Android::clearScreen(FixupType type, byte count) {
if (!_show_overlay)
GLCALL(glEnable(GL_SCISSOR_TEST));
+
+ _show_mouse = sm;
+ _force_redraw = true;
}
void OSystem_Android::updateScreenRect() {
@@ -592,15 +598,15 @@ void OSystem_Android::showOverlay() {
void OSystem_Android::hideOverlay() {
ENTER();
- clearScreen(kClear);
-
_show_overlay = false;
- _force_redraw = true;
updateEventScale();
warpMouse(_game_texture->width() / 2, _game_texture->height() / 2);
+ // double buffered, flip twice
+ clearScreen(kClearUpdate, 2);
+
GLCALL(glEnable(GL_SCISSOR_TEST));
}