aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/org/inodes/gus
diff options
context:
space:
mode:
authordhewg2011-03-03 11:35:21 +0100
committerdhewg2011-03-03 20:47:27 +0100
commita7a7542d1de3f6bb8d076b04cf63a761f01472e1 (patch)
tree05ee92d3923c04229fa79d7827ee6d8fbbaef47c /backends/platform/android/org/inodes/gus
parent1e3c96b3efaea537dfe82b1d535d1d46cc82a8a0 (diff)
downloadscummvm-rg350-a7a7542d1de3f6bb8d076b04cf63a761f01472e1.tar.gz
scummvm-rg350-a7a7542d1de3f6bb8d076b04cf63a761f01472e1.tar.bz2
scummvm-rg350-a7a7542d1de3f6bb8d076b04cf63a761f01472e1.zip
ANDROID: Remove an indirection when pausing
Diffstat (limited to 'backends/platform/android/org/inodes/gus')
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVM.java14
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java4
2 files changed, 4 insertions, 14 deletions
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
index ffb0109e6c..20e0382c00 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
@@ -44,9 +44,9 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
final private native void destroy();
final private native void setSurface(int width, int height);
final private native int main(String[] args);
- final private native void pauseEngine(boolean pause);
- // Set scummvm config options
+ // pause the engine and all native threads
+ final public native void setPause(boolean pause);
final public native void enableZoning(boolean enable);
// Feed an event to ScummVM. Safe to call from other threads.
final public native void pushEvent(Event e);
@@ -135,16 +135,6 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
System.exit(res);
}
- public void pause(boolean pause) {
- if (audio_track != null && !pause)
- audio_track.play();
-
- pauseEngine(pause);
-
- if (audio_track != null && pause)
- audio_track.stop();
- }
-
final private void initEGL() throws Exception {
egl = (EGL10)EGLContext.getEGL();
eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
index 22ccaf0b62..921e248211 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
@@ -175,7 +175,7 @@ public class ScummVMActivity extends Activity {
super.onResume();
if (scummvm != null)
- scummvm.pause(false);
+ scummvm.setPause(false);
}
@Override
@@ -185,7 +185,7 @@ public class ScummVMActivity extends Activity {
super.onPause();
if (scummvm != null)
- scummvm.pause(true);
+ scummvm.setPause(true);
}
@Override