diff options
author | Alyssa Milburn | 2011-04-04 12:21:30 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-04-04 12:23:12 +0200 |
commit | 449e9cf33923f2685356596f82bc596e1f05407c (patch) | |
tree | 385f45d06b31e788907153eddcedc61458835dfc /backends/platform/android | |
parent | 6eeebfb19125b79e4a77e8c35a0d04cf1a5d97bd (diff) | |
download | scummvm-rg350-449e9cf33923f2685356596f82bc596e1f05407c.tar.gz scummvm-rg350-449e9cf33923f2685356596f82bc596e1f05407c.tar.bz2 scummvm-rg350-449e9cf33923f2685356596f82bc596e1f05407c.zip |
ANDROID: Fix non-fullscreen corruption on HTC devices.
HTC's drivers don't preserve the color buffer between frames (as allowed
by the spec, apparently), so we have to force-clear it every frame when
we're not rendering a texture over the whole screen.
Diffstat (limited to 'backends/platform/android')
-rw-r--r-- | backends/platform/android/gfx.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index b2f5427f01..19cfd7f5a3 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -430,7 +430,9 @@ void OSystem_Android::updateScreen() { _force_redraw = false; // clear pointer leftovers in dead areas - if (_show_overlay && !_fullscreen) + // also, HTC's GLES drivers are made of fail and don't preserve the buffer + // ( http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html ) + if ((_show_overlay || _htc_fail) && !_fullscreen) clearScreen(kClear); GLCALL(glPushMatrix()); @@ -525,14 +527,6 @@ void OSystem_Android::updateScreen() { if (!JNI::swapBuffers()) LOGW("swapBuffers failed: 0x%x", glGetError()); - - // HTC's GLES drivers are made of fail - // http://code.google.com/p/android/issues/detail?id=3047 - if (!_show_overlay && _htc_fail) { - const Common::Rect &rect = _game_texture->getDrawRect(); - - glScissor(rect.left, rect.top, rect.width(), rect.height()); - } } Graphics::Surface *OSystem_Android::lockScreen() { |