Invert the native activity preference until adjusted for x86
This commit is contained in:
parent
31d6b7e3f1
commit
0567e8a117
|
@ -22,7 +22,7 @@
|
|||
|
||||
<string name="optimization_opts">Optimization and Debugging Options</string>
|
||||
<string name="experimental_opts">Expert (May cause widespread panic)</string>
|
||||
<string name="select_native">Disable Native Interface</string>
|
||||
<string name="select_native">Enable Native Interface</string>
|
||||
<string name="select_dynarec">Dynarec Options</string>
|
||||
<string name="select_unstable">Unstable Optimisations</string>
|
||||
<string name="select_region">DC Region</string>
|
||||
|
|
|
@ -408,7 +408,7 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
// show it
|
||||
alertDialog.show();
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD && !Config.nonative) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD && Config.nativeact) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, uri, getBaseContext(),
|
||||
GL2JNINative.class));
|
||||
} else {
|
||||
|
|
|
@ -23,6 +23,10 @@ import com.reicast.emulator.emu.JNIdc;
|
|||
|
||||
public class Config {
|
||||
|
||||
public static final String pref_native = "enable_native";
|
||||
public static final String pref_dynarec = "dynarec_opt";
|
||||
public static final String pref_unstable = "unstable_opt";
|
||||
|
||||
public static boolean dynarecopt = true;
|
||||
public static boolean idleskip = true;
|
||||
public static boolean unstableopt = false;
|
||||
|
@ -38,7 +42,7 @@ public class Config {
|
|||
public static int frameskip = 0;
|
||||
public static boolean pvrrender = false;
|
||||
public static String cheatdisk = "null";
|
||||
public static boolean nonative = false;
|
||||
public static boolean nativeact = false;
|
||||
|
||||
private SharedPreferences mPrefs;
|
||||
|
||||
|
@ -51,8 +55,8 @@ public class Config {
|
|||
*
|
||||
*/
|
||||
public void getConfigurationPrefs() {
|
||||
Config.dynarecopt = mPrefs.getBoolean("dynarec_opt", dynarecopt);
|
||||
Config.unstableopt = mPrefs.getBoolean("unstable_opt", unstableopt);
|
||||
Config.dynarecopt = mPrefs.getBoolean(pref_dynarec, dynarecopt);
|
||||
Config.unstableopt = mPrefs.getBoolean(pref_unstable, unstableopt);
|
||||
Config.cable = mPrefs.getInt("dc_cable", cable);
|
||||
Config.dcregion = mPrefs.getInt("dc_region", dcregion);
|
||||
Config.broadcast = mPrefs.getInt("dc_broadcast", broadcast);
|
||||
|
@ -63,7 +67,7 @@ public class Config {
|
|||
Config.frameskip = mPrefs.getInt("frame_skip", frameskip);
|
||||
Config.pvrrender = mPrefs.getBoolean("pvr_render", pvrrender);
|
||||
Config.cheatdisk = mPrefs.getString("cheat_disk", cheatdisk);
|
||||
Config.nonative = mPrefs.getBoolean("native_override", nonative);
|
||||
Config.nativeact = mPrefs.getBoolean(pref_native, nativeact);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,20 +76,20 @@ public class ConfigureFragment extends Fragment {
|
|||
|
||||
public void onCheckedChanged(CompoundButton buttonView,
|
||||
boolean isChecked) {
|
||||
mPrefs.edit().putBoolean("native_override", isChecked).commit();
|
||||
Config.nonative = isChecked;
|
||||
mPrefs.edit().putBoolean(Config.pref_native, isChecked).commit();
|
||||
Config.nativeact = isChecked;
|
||||
}
|
||||
};
|
||||
Switch native_opt = (Switch) getView().findViewById(
|
||||
R.id.native_option);
|
||||
native_opt.setChecked(Config.nonative);
|
||||
native_opt.setChecked(Config.nativeact);
|
||||
native_opt.setOnCheckedChangeListener(native_options);
|
||||
|
||||
OnCheckedChangeListener dynarec_options = new OnCheckedChangeListener() {
|
||||
|
||||
public void onCheckedChanged(CompoundButton buttonView,
|
||||
boolean isChecked) {
|
||||
mPrefs.edit().putBoolean("dynarec_opt", isChecked).commit();
|
||||
mPrefs.edit().putBoolean(Config.pref_dynarec, isChecked).commit();
|
||||
Config.dynarecopt = isChecked;
|
||||
}
|
||||
};
|
||||
|
@ -102,7 +102,7 @@ public class ConfigureFragment extends Fragment {
|
|||
|
||||
public void onCheckedChanged(CompoundButton buttonView,
|
||||
boolean isChecked) {
|
||||
mPrefs.edit().putBoolean("unstable_opt", isChecked).commit();
|
||||
mPrefs.edit().putBoolean(Config.pref_unstable, isChecked).commit();
|
||||
Config.unstableopt = isChecked;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<uses-permission android:name="android.permission.READ_LOGS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
<permission
|
||||
android:name="com.reicast.emulator.debug.permission.C2D_MESSAGE"
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
android:id="@+id/debug_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="0.25"
|
||||
android:text="@string/menu_debug" />
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue