aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/jni.h
diff options
context:
space:
mode:
authordhewg2011-03-02 22:26:15 +0100
committerdhewg2011-03-02 23:18:35 +0100
commitc2d4cce429baa56b5a0962a854ece6163270995f (patch)
treef9bc843af90c3f8c7e4b978849ba6e7860fc0339 /backends/platform/android/jni.h
parent25ef065a4172443eebdd1031c8a387f30f930ec4 (diff)
downloadscummvm-rg350-c2d4cce429baa56b5a0962a854ece6163270995f.tar.gz
scummvm-rg350-c2d4cce429baa56b5a0962a854ece6163270995f.tar.bz2
scummvm-rg350-c2d4cce429baa56b5a0962a854ece6163270995f.zip
ANDROID: On pause, put all threads in a coma
Since not every engine respects pauseEngine(), or they're in a state where it simply gets ignored, put all threads in a group coma. Without this, code still kept looping and wasting cpu cycles, while the user might want to do use her/his droid for something else.
Diffstat (limited to 'backends/platform/android/jni.h')
-rw-r--r--backends/platform/android/jni.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/platform/android/jni.h b/backends/platform/android/jni.h
index 7eb10791aa..569a3dd79b 100644
--- a/backends/platform/android/jni.h
+++ b/backends/platform/android/jni.h
@@ -29,6 +29,7 @@
#if defined(__ANDROID__)
#include <jni.h>
+#include <semaphore.h>
#include "common/fs.h"
#include "common/archive.h"
@@ -41,6 +42,9 @@ private:
virtual ~JNI();
public:
+ static bool pause;
+ static sem_t pause_sem;
+
static int surface_changeid;
static int egl_surface_width;
static int egl_surface_height;