Android: enable DSP, Add dynarec safemode/disable div matching

This commit is contained in:
Flyinghead 2018-12-07 12:58:07 +01:00
parent 9fe13e20e8
commit 2b16edd71f
5 changed files with 71 additions and 3 deletions

View File

@ -537,7 +537,8 @@ void LoadSettings()
#else
// TODO Expose this with JNI
settings.rend.Clipping = 1;
settings.aica.NoBatch = 1;
settings.rend.RenderToTextureUpscale = 1;
settings.rend.TextureUpscale = 1;
// Configured on a per-game basis
settings.rend.ExtraDepthScale = 1.f;

View File

@ -37,7 +37,7 @@ public class Emulator extends Application {
public static int dcregion = 3;
public static int broadcast = 4;
public static boolean limitfps = true;
public static boolean nobatch = false;
public static boolean nobatch = true;
public static boolean nosound = false;
public static boolean interrupt = false;
public static boolean mipmaps = true;

View File

@ -279,6 +279,17 @@ public class OptionsFragment extends Fragment {
dynarec_opt.setChecked(Emulator.dynarecopt);
dynarec_opt.setOnCheckedChangeListener(dynarec_options);
OnCheckedChangeListener safemode_option = new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
mPrefs.edit().putBoolean(Emulator.pref_dynsafemode, isChecked).apply();
}
};
CompoundButton safemode_opt = (CompoundButton) getView().findViewById(R.id.dynarec_safemode);
safemode_opt.setChecked(mPrefs.getBoolean(Emulator.pref_dynsafemode, Emulator.dynsafemode));
safemode_opt.setOnCheckedChangeListener(safemode_option);
OnCheckedChangeListener unstable_option = new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,
@ -339,7 +350,7 @@ public class OptionsFragment extends Fragment {
getActivity(), R.layout.spinner_selected, broadcasts);
broadcastAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
broadcast_spnr.setAdapter(broadcastAdapter);
broadcast_spnr.setSelection(mPrefs.getInt(Emulator.pref_broadcast, Emulator.broadcast), true);
broadcast_spnr.setSelection(Math.min(mPrefs.getInt(Emulator.pref_broadcast, Emulator.broadcast), broadcast_spnr.getCount() - 1), true);
broadcast_spnr.setOnItemSelectedListener(new OnItemSelectedListener() {

View File

@ -245,6 +245,34 @@
</LinearLayout>
</TableRow>
<TableRow
android:layout_marginTop="10dp"
android:gravity="center_vertical" >
<TextView
android:id="@+id/safemode_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:ems="10"
android:gravity="center_vertical|left"
android:text="@string/select_safemode" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical" >
<Switch
android:id="@+id/dynarec_safemode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true" />
</LinearLayout>
</TableRow>
<TableRow
android:layout_marginTop="10dp"
android:gravity="center_vertical" >

View File

@ -245,6 +245,34 @@
</LinearLayout>
</TableRow>
<TableRow
android:layout_marginTop="10dp"
android:gravity="center_vertical" >
<TextView
android:id="@+id/safemode_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:ems="10"
android:gravity="center_vertical|left"
android:text="@string/select_safemode" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical" >
<Checkbox
android:id="@+id/dynarec_safemode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true" />
</LinearLayout>
</TableRow>
<TableRow
android:layout_marginTop="10dp"
android:gravity="center_vertical" >