diff options
Diffstat (limited to 'backends/platform/android/android.cpp')
-rw-r--r-- | backends/platform/android/android.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index f6af0fcff5..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()) { } @@ -400,7 +398,7 @@ static void ScummVM_audioMixCallback(JNIEnv* env, jobject self, jsize len = env->GetArrayLength(jbuf); jbyte* buf = env->GetByteArrayElements(jbuf, NULL); if (buf == NULL) { - warning("Unable to get Java audio byte array. Skipping."); + warning("Unable to get Java audio byte array. Skipping"); return; } Audio::MixerImpl* mixer = @@ -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() { @@ -1135,7 +1139,7 @@ OSystem::MutexRef OSystem_Android::createMutex() { pthread_mutex_t *mutex = new pthread_mutex_t; if (pthread_mutex_init(mutex, &attr) != 0) { - warning("pthread_mutex_init() failed!"); + warning("pthread_mutex_init() failed"); delete mutex; return NULL; } @@ -1144,18 +1148,18 @@ OSystem::MutexRef OSystem_Android::createMutex() { void OSystem_Android::lockMutex(MutexRef mutex) { if (pthread_mutex_lock((pthread_mutex_t*)mutex) != 0) - warning("pthread_mutex_lock() failed!"); + warning("pthread_mutex_lock() failed"); } void OSystem_Android::unlockMutex(MutexRef mutex) { if (pthread_mutex_unlock((pthread_mutex_t*)mutex) != 0) - warning("pthread_mutex_unlock() failed!"); + warning("pthread_mutex_unlock() failed"); } void OSystem_Android::deleteMutex(MutexRef mutex) { pthread_mutex_t* m = (pthread_mutex_t*)mutex; if (pthread_mutex_destroy(m) != 0) - warning("pthread_mutex_destroy() failed!"); + warning("pthread_mutex_destroy() failed"); else delete m; } @@ -1330,7 +1334,7 @@ static void ScummVM_enableZoning(JNIEnv* env, jobject self, jboolean enable) { static void ScummVM_setSurfaceSize(JNIEnv* env, jobject self, jint width, jint height) { OSystem_Android* cpp_obj = OSystem_Android::fromJavaObject(env, self); - cpp_obj->setSurfaceSize(width, height); + cpp_obj->setSurfaceSize(width, height); } const static JNINativeMethod gMethods[] = { |