aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authorAngus Lees2010-10-25 07:27:05 +0000
committerAngus Lees2010-10-25 07:27:05 +0000
commit2bf64b10506a97a7e9342e5d97ad89bd33628a53 (patch)
tree66582a8b0eb8e7e1860061d3d56ac8a182c18f2c /backends/platform/android
parent5942382ad4643b9cab526b161b4d04dc71babdc5 (diff)
downloadscummvm-rg350-2bf64b10506a97a7e9342e5d97ad89bd33628a53.tar.gz
scummvm-rg350-2bf64b10506a97a7e9342e5d97ad89bd33628a53.tar.bz2
scummvm-rg350-2bf64b10506a97a7e9342e5d97ad89bd33628a53.zip
ANDROID: Force extra screen update when updating overlay.
This appears to work around a blank screen bug Nexus1. I never tracked it down, but as far as I can tell it is triggered by multiple overlapping updates before flushing the texture to screen. This condition only happens in the overlay atm so an extra redraw isn't the end of the world. (Also remove an unused _full_screen_dirty property) svn-id: r53801
Diffstat (limited to 'backends/platform/android')
-rw-r--r--backends/platform/android/android.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index dcc4e37458..38f387b201 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -109,7 +109,7 @@ static void JNU_ThrowByName(JNIEnv* env, const char* name, const char* msg) {
env->DeleteLocalRef(cls);
}
-// floating point. use sparingly.
+// floating point. use sparingly.
template <class T>
static inline T scalef(T in, float numerator, float denominator) {
return static_cast<float>(in) * numerator / denominator;
@@ -177,7 +177,6 @@ private:
GLESPaletteTexture* _game_texture;
int _shake_offset;
Common::Rect _focus_rect;
- bool _full_screen_dirty;
// Overlay layer
GLES4444Texture* _overlay_texture;
@@ -320,7 +319,6 @@ OSystem_Android::OSystem_Android(jobject am)
_fsFactory(new POSIXFilesystemFactory()),
_asset_archive(new AndroidAssetArchive(am)),
_shake_offset(0),
- _full_screen_dirty(false),
_event_queue_lock(createMutex()) {
}
@@ -862,6 +860,9 @@ void OSystem_Android::hideOverlay() {
void OSystem_Android::clearOverlay() {
ENTER("clearOverlay()");
_overlay_texture->fillBuffer(0);
+
+ // Shouldn't need this, but works around a 'blank screen' bug on Nexus1
+ updateScreen();
}
void OSystem_Android::grabOverlay(OverlayColor *buf, int pitch) {
@@ -887,6 +888,9 @@ void OSystem_Android::copyRectToOverlay(const OverlayColor *buf, int pitch,
// This 'pitch' is pixels not bytes
_overlay_texture->updateBuffer(x, y, w, h, buf, pitch * sizeof(buf[0]));
+
+ // Shouldn't need this, but works around a 'blank screen' bug on Nexus1?
+ updateScreen();
}
int16 OSystem_Android::getOverlayHeight() {