Merge pull request #1256 from reicast/lk/android-studio
Android: add setting for modifier volumes to shell
This commit is contained in:
commit
3d5945677a
|
@ -24,6 +24,7 @@ public class Emulator extends Application {
|
|||
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_modvols = "modifier_volumes";
|
||||
public static final String pref_cheatdisk = "cheat_disk";
|
||||
public static final String pref_usereios = "use_reios";
|
||||
|
||||
|
@ -42,6 +43,7 @@ public class Emulator extends Application {
|
|||
public static int frameskip = 0;
|
||||
public static boolean pvrrender = false;
|
||||
public static boolean syncedrender = false;
|
||||
public static boolean modvols = true;
|
||||
public static String cheatdisk = "null";
|
||||
public static boolean usereios = false;
|
||||
public static boolean nativeact = false;
|
||||
|
|
|
@ -468,6 +468,17 @@ public class OptionsFragment extends Fragment {
|
|||
synced_render.setChecked(Emulator.syncedrender);
|
||||
synced_render.setOnCheckedChangeListener(synchronous);
|
||||
|
||||
OnCheckedChangeListener mod_volumes = new OnCheckedChangeListener() {
|
||||
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
mPrefs.edit().putBoolean(Emulator.pref_modvols, isChecked).apply();
|
||||
Emulator.modvols = isChecked;
|
||||
}
|
||||
};
|
||||
CompoundButton modifier_volumes = (CompoundButton) getView().findViewById(R.id.modvols_option);
|
||||
modifier_volumes.setChecked(Emulator.modvols);
|
||||
modifier_volumes.setOnCheckedChangeListener(mod_volumes);
|
||||
|
||||
final EditText cheatEdit = (EditText) getView().findViewById(R.id.cheat_disk);
|
||||
String disk = Emulator.cheatdisk;
|
||||
if (disk != null && disk.contains("/")) {
|
||||
|
|
|
@ -60,6 +60,7 @@ extern "C"
|
|||
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_modvols(JNIEnv *env,jobject obj, jint volumes) __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")));
|
||||
|
@ -140,6 +141,11 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_syncedrender(JNIEnv *
|
|||
settings.pvr.SynchronousRendering = sync;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_modvols(JNIEnv *env,jobject obj, jint volumes)
|
||||
{
|
||||
settings.rend.ModifierVolumes = volumes;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk)
|
||||
{
|
||||
|
||||
|
|
|
@ -747,6 +747,34 @@
|
|||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/modvols_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_modvols" />
|
||||
|
||||
<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/modvols_option"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true" />
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -747,6 +747,34 @@
|
|||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/modvols_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_modvols" />
|
||||
|
||||
<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/modvols_option"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true" />
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -45,8 +45,9 @@
|
|||
<string name="select_mipmaps">Use Mipmaps (fixes SGX540)</string>
|
||||
<string name="select_stretch">Widescreen Mode</string>
|
||||
<string name="set_frameskip">Frameskip Value</string>
|
||||
<string name="select_syncrender">Synchronous Rendering</string>
|
||||
<string name="select_render">PVR Rendering (does nothing for now)</string>
|
||||
<string name="select_syncrender">Synchronous Rendering</string>
|
||||
<string name="select_modvols">Enable Modifier Volumes</string>
|
||||
<string name="select_fps">Show On-Screen FPS</string>
|
||||
<string name="select_software">Force Software Rendering</string>
|
||||
<string name="select_sound">Disable Emulator Sound</string>
|
||||
|
|
Loading…
Reference in New Issue