diff --git a/shell/android/jni/src/Android.cpp b/shell/android/jni/src/Android.cpp
index 0fe8deb93..72a5c86af 100644
--- a/shell/android/jni/src/Android.cpp
+++ b/shell/android/jni/src/Android.cpp
@@ -58,6 +58,7 @@ extern "C"
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_subdivide(JNIEnv *env,jobject obj, jint subdivide) __attribute__((visibility("default")));
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames) __attribute__((visibility("default")));
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_pvrrender(JNIEnv *env,jobject obj, jint render) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_syncedrender(JNIEnv *env,jobject obj, jint sync) __attribute__((visibility("default")));
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk) __attribute__((visibility("default")));
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_usereios(JNIEnv *env,jobject obj, jint reios) __attribute__((visibility("default")));
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dreamtime(JNIEnv *env,jobject obj, jlong clock) __attribute__((visibility("default")));
@@ -133,6 +134,11 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_pvrrender(JNIEnv *env
settings.pvr.rend = render;
}
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_syncedrender(JNIEnv *env,jobject obj, jint sync)
+{
+ settings.pvr.SynchronousRendering = sync;
+}
+
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk)
{
diff --git a/shell/android/res/layout/configure_fragment.xml b/shell/android/res/layout/configure_fragment.xml
index 90cb954ad..10e218da2 100644
--- a/shell/android/res/layout/configure_fragment.xml
+++ b/shell/android/res/layout/configure_fragment.xml
@@ -718,6 +718,34 @@
android:focusable="true" />
+
+
+
+
+
+
+
+
+
+
Use Mipmaps (fixes SGX540)
Widescreen Mode
Frameskip Value
+ Synchronous Rendering
PVR Rendering (does nothing for now)
- Show On-screen FPS
+ Show On-Screen FPS
Force Software Rendering
Disable Emulator Sound
Rendering Depth
diff --git a/shell/android/src/com/reicast/emulator/config/Config.java b/shell/android/src/com/reicast/emulator/config/Config.java
index af6932a64..401abd29b 100644
--- a/shell/android/src/com/reicast/emulator/config/Config.java
+++ b/shell/android/src/com/reicast/emulator/config/Config.java
@@ -30,6 +30,7 @@ public class Config {
public static final String pref_widescreen = "stretch_view";
public static final String pref_frameskip = "frame_skip";
public static final String pref_pvrrender = "pvr_render";
+ public static final String pref_syncedrender = "synced_render";
public static final String pref_cheatdisk = "cheat_disk";
public static final String pref_usereios = "use_reios";
@@ -57,6 +58,7 @@ public class Config {
public static boolean subdivide = false;
public static int frameskip = 0;
public static boolean pvrrender = false;
+ public static boolean syncedrender = false;
public static String cheatdisk = "null";
public static boolean usereios = false;
public static boolean nativeact = false;
@@ -90,6 +92,7 @@ public class Config {
Config.widescreen = mPrefs.getBoolean(pref_widescreen, widescreen);
Config.frameskip = mPrefs.getInt(pref_frameskip, frameskip);
Config.pvrrender = mPrefs.getBoolean(pref_pvrrender, pvrrender);
+ Config.syncedrender = mPrefs.getBoolean(pref_syncedrender, syncedrender);
Config.cheatdisk = mPrefs.getString(pref_cheatdisk, cheatdisk);
Config.usereios = mPrefs.getBoolean(pref_usereios, usereios);
Config.nativeact = mPrefs.getBoolean(pref_nativeact, nativeact);
@@ -114,6 +117,7 @@ public class Config {
JNIdc.subdivide(Config.subdivide ? 1 : 0);
JNIdc.frameskip(Config.frameskip);
JNIdc.pvrrender(Config.pvrrender ? 1 : 0);
+ JNIdc.syncedrender(Config.syncedrender ? 1 : 0);
JNIdc.usereios(Config.usereios ? 1 : 0);
JNIdc.cheatdisk(Config.cheatdisk);
JNIdc.dreamtime(DreamTime.getDreamtime());
diff --git a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java
index 1bb562a3d..c52e3c1d1 100644
--- a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java
+++ b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java
@@ -451,6 +451,16 @@ public class OptionsFragment extends Fragment {
pvr_render.setChecked(Config.pvrrender);
pvr_render.setOnCheckedChangeListener(pvr_rendering);
+ OnCheckedChangeListener synchronous = new OnCheckedChangeListener() {
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mPrefs.edit().putBoolean(Config.pref_syncedrender, isChecked).commit();
+ Config.syncedrender = isChecked;
+ }
+ };
+ Switch synced_render = (Switch) getView().findViewById(R.id.syncrender_option);
+ synced_render.setChecked(Config.syncedrender);
+ synced_render.setOnCheckedChangeListener(synchronous);
+
final EditText cheatEdit = (EditText) getView().findViewById(R.id.cheat_disk);
String disk = Config.cheatdisk;
if (disk != null && disk.contains("/")) {
diff --git a/shell/android/src/com/reicast/emulator/emu/JNIdc.java b/shell/android/src/com/reicast/emulator/emu/JNIdc.java
index 852efe09c..d85baa30f 100644
--- a/shell/android/src/com/reicast/emulator/emu/JNIdc.java
+++ b/shell/android/src/com/reicast/emulator/emu/JNIdc.java
@@ -41,6 +41,7 @@ public final class JNIdc
public static native void subdivide(int subdivide);
public static native void frameskip(int frames);
public static native void pvrrender(int render);
+ public static native void syncedrender(int sync);
public static native void cheatdisk(String disk);
public static native void usereios(int reios);
public static native void dreamtime(long clock);