aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authoruruk2014-02-16 15:24:28 +0100
committeruruk2014-02-16 15:24:28 +0100
commit9b51c60beb44a3bab6dc51dc53c10dddecc58299 (patch)
tree64930e0cceed7fe9ee7227055efb9ae3a7fd03ec /backends
parent58296158200ae9dd441dbb7f77d8299649c94098 (diff)
parent8df46608ad3f56012163b2e4e19d748bb187466d (diff)
downloadscummvm-rg350-9b51c60beb44a3bab6dc51dc53c10dddecc58299.tar.gz
scummvm-rg350-9b51c60beb44a3bab6dc51dc53c10dddecc58299.tar.bz2
scummvm-rg350-9b51c60beb44a3bab6dc51dc53c10dddecc58299.zip
Merge branch 'master' of https://github.com/scummvm/scummvm
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVM.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVM.java b/backends/platform/android/org/scummvm/scummvm/ScummVM.java
index 3a25b54eeb..5047502e61 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVM.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVM.java
@@ -86,13 +86,15 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
Log.d(LOG_TAG, String.format("surfaceChanged: %dx%d (%d)",
width, height, format));
+ // store values for the native code
+ // make sure to do it before notifying the lock
+ // as it leads to a race condition otherwise
+ setSurface(width, height);
+
synchronized(_sem_surface) {
_surface_holder = holder;
_sem_surface.notifyAll();
}
-
- // store values for the native code
- setSurface(width, height);
}
// SurfaceHolder callback