diff --git a/core/nullDC.cpp b/core/nullDC.cpp
index 7e4e21c3d..db05e160d 100755
--- a/core/nullDC.cpp
+++ b/core/nullDC.cpp
@@ -286,28 +286,28 @@ void dc_stop()
void LoadSettings()
{
#ifndef _ANDROID
- settings.dynarec.Enable = cfgLoadInt("config","Dynarec.Enabled", 1)!=0;
- settings.dynarec.idleskip = cfgLoadInt("config","Dynarec.idleskip",1)!=0;
- settings.dynarec.unstable_opt = cfgLoadInt("config","Dynarec.unstable-opt",0);
- settings.dynarec.safemode = cfgLoadInt("config","Dynarec.safemode",0);
+ settings.dynarec.Enable = cfgLoadInt("config", "Dynarec.Enabled", 1) != 0;
+ settings.dynarec.idleskip = cfgLoadInt("config", "Dynarec.idleskip", 1) != 0;
+ settings.dynarec.unstable_opt = cfgLoadInt("config", "Dynarec.unstable-opt", 0);
+ settings.dynarec.safemode = cfgLoadInt("config", "Dynarec.safemode", 0);
//disable_nvmem can't be loaded, because nvmem init is before cfg load
- settings.dreamcast.cable = cfgLoadInt("config","Dreamcast.Cable",3);
- settings.dreamcast.RTC = cfgLoadInt("config","Dreamcast.RTC",GetRTC_now());
- settings.dreamcast.region = cfgLoadInt("config","Dreamcast.Region",3);
- settings.dreamcast.broadcast = cfgLoadInt("config","Dreamcast.Broadcast",4);
- settings.aica.LimitFPS = cfgLoadInt("config","aica.LimitFPS",1);
- settings.aica.NoBatch = cfgLoadInt("config","aica.NoBatch",0);
- settings.aica.NoSound = cfgLoadInt("config","aica.NoSound",0);
- settings.aica.InterruptHack = cfgLoadInt("config","aica.InterruptHack",0);
- settings.rend.UseMipmaps = cfgLoadInt("config","rend.UseMipmaps",1);
- settings.rend.WideScreen = cfgLoadInt("config","rend.WideScreen",0);
- settings.rend.ModifierVolumes = cfgLoadInt("config","rend.ModifierVolumes",1);
- settings.rend.Clipping = cfgLoadInt("config","rend.Clipping",1);
+ settings.dreamcast.cable = cfgLoadInt("config", "Dreamcast.Cable", 3);
+ settings.dreamcast.RTC = cfgLoadInt("config", "Dreamcast.RTC", GetRTC_now());
+ settings.dreamcast.region = cfgLoadInt("config", "Dreamcast.Region", 3);
+ settings.dreamcast.broadcast = cfgLoadInt("config", "Dreamcast.Broadcast", 4);
+ settings.aica.LimitFPS = cfgLoadInt("config", "aica.LimitFPS", 1);
+ settings.aica.NoBatch = cfgLoadInt("config", "aica.NoBatch", 0);
+ settings.aica.NoSound = cfgLoadInt("config", "aica.NoSound", 0);
+ settings.aica.InterruptHack = cfgLoadInt("config", "aica.InterruptHack", 0);
+ settings.rend.UseMipmaps = cfgLoadInt("config", "rend.UseMipmaps", 1);
+ settings.rend.WideScreen = cfgLoadInt("config", "rend.WideScreen", 0);
+ settings.rend.ModifierVolumes = cfgLoadInt("config", "rend.ModifierVolumes", 1);
+ settings.rend.Clipping = cfgLoadInt("config", "rend.Clipping", 1);
- settings.pvr.subdivide_transp = cfgLoadInt("config","pvr.Subdivide",0);
+ settings.pvr.subdivide_transp = cfgLoadInt("config", "pvr.Subdivide", 0);
- settings.pvr.ta_skip = cfgLoadInt("config","ta.skip",0);
- settings.pvr.rend = cfgLoadInt("config","pvr.rend",0);
+ settings.pvr.ta_skip = cfgLoadInt("config", "ta.skip", 0);
+ settings.pvr.rend = cfgLoadInt("config", "pvr.rend", 0);
settings.pvr.MaxThreads = cfgLoadInt("config", "pvr.MaxThreads", 3);
settings.pvr.SynchronousRender = cfgLoadInt("config", "pvr.SynchronousRendering", 0);
@@ -354,6 +354,7 @@ void LoadCustom()
char *reios_id = reios_disk_id();
cfgSaveStr(reios_id, "software.name", reios_software_name);
+ settings.dynarec.Enable = cfgLoadInt(reios_id,"Dynarec.Enabled", settings.dynarec.Enable ? 1 : 0) != 0;
settings.dynarec.idleskip = cfgGameInt(reios_id,"Dynarec.idleskip", settings.dynarec.idleskip ? 1 : 0) != 0;
settings.dynarec.unstable_opt = cfgGameInt(reios_id,"Dynarec.unstable-opt", settings.dynarec.unstable_opt);
settings.dynarec.safemode = cfgGameInt(reios_id,"Dynarec.safemode", settings.dynarec.safemode);
diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/Emulator.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/Emulator.java
index 35b24f75b..e72146144 100644
--- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/Emulator.java
+++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/Emulator.java
@@ -110,6 +110,7 @@ public class Emulator extends Application {
public void loadGameConfiguration(String gameId) {
SharedPreferences mPrefs = getSharedPreferences(gameId, Activity.MODE_PRIVATE);
+ JNIdc.dynarec(mPrefs.getBoolean(pref_dynarecopt, dynarecopt) ? 1 : 0);
JNIdc.unstable(mPrefs.getBoolean(pref_unstable, unstableopt) ? 1 : 0);
JNIdc.safemode(mPrefs.getBoolean(pref_dynsafemode, dynsafemode) ? 1 : 0);
JNIdc.interrupthack(mPrefs.getBoolean(pref_interrupt, interrupt) ? 1 : 0);
diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/PGConfigFragment.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/PGConfigFragment.java
index 562b00788..1d328a6d6 100644
--- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/PGConfigFragment.java
+++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/PGConfigFragment.java
@@ -45,6 +45,7 @@ public class PGConfigFragment extends Fragment {
private Spinner mSpnrConfigs;
+ private CompoundButton dynarec_opt;
private CompoundButton unstable_opt;
private CompoundButton safemode_opt;
private EditText mainFrames;
@@ -82,6 +83,7 @@ public class PGConfigFragment extends Fragment {
new LocateConfigs(PGConfigFragment.this).execute("/data/data/"
+ getActivity().getPackageName() + "/shared_prefs/");
+ dynarec_opt = (CompoundButton) getView().findViewById(R.id.dynarec_option);
unstable_opt = (CompoundButton) getView().findViewById(R.id.unstable_option);
safemode_opt = (CompoundButton) getView().findViewById(R.id.dynarec_safemode);
mainFrames = (EditText) getView().findViewById(R.id.current_frames);
@@ -94,7 +96,9 @@ public class PGConfigFragment extends Fragment {
}
private void saveSettings(SharedPreferences mPrefs) {
- mPrefs.edit().putBoolean(Emulator.pref_unstable, unstable_opt.isChecked())
+ mPrefs.edit()
+ .putBoolean(Emulator.pref_dynarecopt, dynarec_opt.isChecked())
+ .putBoolean(Emulator.pref_unstable, unstable_opt.isChecked())
.putBoolean(Emulator.pref_dynsafemode, safemode_opt.isChecked())
.putInt(Emulator.pref_frameskip, frameSeek.getProgress())
.putBoolean(Emulator.pref_pvrrender, pvr_render.isChecked())
@@ -109,6 +113,7 @@ public class PGConfigFragment extends Fragment {
private void configureViewByGame(String gameId) {
final SharedPreferences mPrefs = getActivity()
.getSharedPreferences(gameId, Activity.MODE_PRIVATE);
+ dynarec_opt.setChecked(mPrefs.getBoolean(Emulator.pref_dynarecopt, Emulator.dynarecopt));
unstable_opt.setChecked(mPrefs.getBoolean(Emulator.pref_unstable, Emulator.unstableopt));
safemode_opt.setChecked(mPrefs.getBoolean(Emulator.pref_dynsafemode, Emulator.dynsafemode));
diff --git a/shell/android-studio/reicast/src/main/res/layout-v14/configure_fragment.xml b/shell/android-studio/reicast/src/main/res/layout-v14/configure_fragment.xml
index 8578f825a..6ec1364fa 100644
--- a/shell/android-studio/reicast/src/main/res/layout-v14/configure_fragment.xml
+++ b/shell/android-studio/reicast/src/main/res/layout-v14/configure_fragment.xml
@@ -273,34 +273,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -575,6 +547,34 @@
android:focusable="true" />
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
@@ -170,6 +142,62 @@
android:layout_height="2dp"
android:background="@drawable/list_item_border" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml b/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml
index 3aff86e6c..13f57ccb6 100644
--- a/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml
+++ b/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml
@@ -273,34 +273,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -575,6 +547,34 @@
android:focusable="true" />
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
@@ -170,6 +142,62 @@
android:layout_height="2dp"
android:background="@drawable/list_item_border" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+