From 598ea65c161c7ff8e6063fa885d0fdbc4e5956e0 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Wed, 6 Feb 2019 22:28:04 +0100 Subject: [PATCH] Android: use boolean prefs when possible. OSX build fix Use jboolean instead of jint Fix crash when navigating UI with popup keyboard's next button Remove unused UI (PVR rendering) OSX fixes --- core/deps/imgui/imconfig.h | 4 ++ core/rend/gui.cpp | 21 +++++++ core/rend/gui.h | 19 ++++++- .../java/com/reicast/emulator/Emulator.java | 52 ++++++++--------- .../emulator/config/OptionsFragment.java | 18 ++---- .../emulator/config/PGConfigFragment.java | 5 +- .../java/com/reicast/emulator/emu/JNIdc.java | 30 +++++----- .../reicast/src/main/jni/src/Android.cpp | 56 +++++++++---------- .../res/layout-v14/configure_fragment.xml | 28 ---------- .../main/res/layout/configure_fragment.xml | 28 ---------- 10 files changed, 118 insertions(+), 143 deletions(-) diff --git a/core/deps/imgui/imconfig.h b/core/deps/imgui/imconfig.h index 75354d24c..6b1c655f8 100644 --- a/core/deps/imgui/imconfig.h +++ b/core/deps/imgui/imconfig.h @@ -71,7 +71,11 @@ namespace ImGui void MyFunction(const char* name, const MyMatrix44& v); } */ +#if HOST_OS == OS_DARWIN +#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM +#else #define IMGUI_IMPL_OPENGL_LOADER_CUSTOM +#endif #ifdef _ANDROID #include diff --git a/core/rend/gui.cpp b/core/rend/gui.cpp index 44e2153ac..e96c94f26 100644 --- a/core/rend/gui.cpp +++ b/core/rend/gui.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2019 flyinghead + + This file is part of reicast. + + reicast is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + reicast is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with reicast. If not, see . + */ #include #include "oslib/oslib.h" @@ -73,6 +91,8 @@ void gui_init() // Setup Platform/Renderer bindings #ifdef GLES ImGui_ImplOpenGL3_Init("#version 100"); // OpenGL ES 2.0 +#elif HOST_OS == OS_DARWIN + ImGui_ImplOpenGL3_Init("#version 140"); // OpenGL 3.1 #else ImGui_ImplOpenGL3_Init("#version 130"); // OpenGL 3.0 #endif @@ -442,6 +462,7 @@ void gui_display_ui() gui_display_commands(); break; case Closed: + case ClosedNoResume: break; } diff --git a/core/rend/gui.h b/core/rend/gui.h index 573ed3e23..edb3bd680 100644 --- a/core/rend/gui.h +++ b/core/rend/gui.h @@ -1,5 +1,22 @@ +/* + Copyright 2019 flyinghead + + This file is part of reicast. + + reicast is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + reicast is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with reicast. If not, see . + */ void gui_init(); -void gui_dosmth(int width, int height); void gui_open_settings(); bool gui_is_open(); bool gui_display_ui(); 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 ca8851085..1b3c44795 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 @@ -52,7 +52,7 @@ public class Emulator extends Application { public static boolean widescreen = false; public static boolean subdivide = false; public static int frameskip = 0; - public static boolean pvrrender = false; + public static int pvrrender = 0; public static boolean syncedrender = false; public static boolean modvols = true; public static boolean clipping = true; @@ -81,7 +81,7 @@ public class Emulator extends Application { Emulator.mipmaps = mPrefs.getBoolean(pref_mipmaps, mipmaps); Emulator.widescreen = mPrefs.getBoolean(pref_widescreen, widescreen); Emulator.frameskip = mPrefs.getInt(pref_frameskip, frameskip); - Emulator.pvrrender = mPrefs.getBoolean(pref_pvrrender, pvrrender); + Emulator.pvrrender = mPrefs.getInt(pref_pvrrender, pvrrender); Emulator.syncedrender = mPrefs.getBoolean(pref_syncedrender, syncedrender); Emulator.modvols = mPrefs.getBoolean(pref_modvols, modvols); Emulator.clipping = mPrefs.getBoolean(pref_clipping, clipping); @@ -97,43 +97,43 @@ public class Emulator extends Application { * */ public void loadConfigurationPrefs() { - JNIdc.dynarec(Emulator.dynarecopt ? 1 : 0); - JNIdc.idleskip(Emulator.idleskip ? 1 : 0); - JNIdc.unstable(Emulator.unstableopt ? 1 : 0); - JNIdc.safemode(Emulator.dynsafemode ? 1 : 0); + JNIdc.dynarec(Emulator.dynarecopt); + JNIdc.idleskip(Emulator.idleskip); + JNIdc.unstable(Emulator.unstableopt); + JNIdc.safemode(Emulator.dynsafemode); JNIdc.cable(Emulator.cable); JNIdc.region(Emulator.dcregion); JNIdc.broadcast(Emulator.broadcast); JNIdc.language(Emulator.language); - JNIdc.limitfps(Emulator.limitfps ? 1 : 0); - JNIdc.nobatch(Emulator.nobatch ? 1 : 0); - JNIdc.nosound(Emulator.nosound ? 1 : 0); - JNIdc.mipmaps(Emulator.mipmaps ? 1 : 0); - JNIdc.widescreen(Emulator.widescreen ? 1 : 0); - JNIdc.subdivide(Emulator.subdivide ? 1 : 0); + JNIdc.limitfps(Emulator.limitfps); + JNIdc.nobatch(Emulator.nobatch); + JNIdc.nosound(Emulator.nosound); + JNIdc.mipmaps(Emulator.mipmaps); + JNIdc.widescreen(Emulator.widescreen); + JNIdc.subdivide(Emulator.subdivide); JNIdc.frameskip(Emulator.frameskip); - JNIdc.pvrrender(Emulator.pvrrender ? 1 : 0); - JNIdc.syncedrender(Emulator.syncedrender ? 1 : 0); - JNIdc.modvols(Emulator.modvols ? 1 : 0); - JNIdc.clipping(Emulator.clipping ? 1 : 0); - JNIdc.usereios(Emulator.usereios ? 1 : 0); + JNIdc.pvrrender(Emulator.pvrrender); + JNIdc.syncedrender(Emulator.syncedrender); + JNIdc.modvols(Emulator.modvols); + JNIdc.clipping(Emulator.clipping); + JNIdc.usereios(Emulator.usereios); JNIdc.bootdisk(Emulator.bootdisk); - JNIdc.customtextures(Emulator.customtextures ? 1 : 0); + JNIdc.customtextures(Emulator.customtextures); JNIdc.showfps(Emulator.showfps); } 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.dynarec(mPrefs.getBoolean(pref_dynarecopt, dynarecopt)); + JNIdc.unstable(mPrefs.getBoolean(pref_unstable, unstableopt)); + JNIdc.safemode(mPrefs.getBoolean(pref_dynsafemode, dynsafemode)); JNIdc.frameskip(mPrefs.getInt(pref_frameskip, frameskip)); - JNIdc.pvrrender(mPrefs.getBoolean(pref_pvrrender, pvrrender) ? 1 : 0); - JNIdc.syncedrender(mPrefs.getBoolean(pref_syncedrender, syncedrender) ? 1 : 0); - JNIdc.modvols(mPrefs.getBoolean(pref_modvols, modvols) ? 1 : 0); - JNIdc.clipping(mPrefs.getBoolean(pref_clipping, clipping) ? 1 : 0); + JNIdc.pvrrender(mPrefs.getInt(pref_pvrrender, pvrrender)); + JNIdc.syncedrender(mPrefs.getBoolean(pref_syncedrender, syncedrender)); + JNIdc.modvols(mPrefs.getBoolean(pref_modvols, modvols)); + JNIdc.clipping(mPrefs.getBoolean(pref_clipping, clipping)); JNIdc.bootdisk(mPrefs.getString(pref_bootdisk, bootdisk)); - JNIdc.customtextures(mPrefs.getBoolean(pref_customtextures, customtextures) ? 1 : 0); + JNIdc.customtextures(mPrefs.getBoolean(pref_customtextures, customtextures)); } /** diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java index 573cd0a7c..d9a209ef8 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java @@ -149,7 +149,7 @@ public class OptionsFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { if (v.getText() != null) { @@ -221,7 +221,7 @@ public class OptionsFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { if (v.getText() != null) { @@ -440,7 +440,7 @@ public class OptionsFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { if (v.getText() != null) { @@ -456,16 +456,6 @@ public class OptionsFragment extends Fragment { } }); - OnCheckedChangeListener pvr_rendering = new OnCheckedChangeListener() { - - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - mPrefs.edit().putBoolean(Emulator.pref_pvrrender, isChecked).apply(); - } - }; - CompoundButton pvr_render = (CompoundButton) getView().findViewById(R.id.render_option); - pvr_render.setChecked(mPrefs.getBoolean(Emulator.pref_pvrrender, Emulator.pvrrender)); - pvr_render.setOnCheckedChangeListener(pvr_rendering); - OnCheckedChangeListener synchronous = new OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { mPrefs.edit().putBoolean(Emulator.pref_syncedrender, isChecked).apply(); @@ -491,7 +481,7 @@ public class OptionsFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { String disk = null; 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 557a55706..76ada6e3d 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 @@ -173,7 +173,7 @@ public class PGConfigFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { if (v.getText() != null) { @@ -188,7 +188,6 @@ public class PGConfigFragment extends Fragment { } }); - pvr_render.setChecked(mPrefs.getBoolean(Emulator.pref_pvrrender, Emulator.pvrrender)); synced_render.setChecked(mPrefs.getBoolean(Emulator.pref_syncedrender, Emulator.syncedrender)); modifier_volumes.setChecked(mPrefs.getBoolean(Emulator.pref_modvols, Emulator.modvols)); interrupt_opt.setChecked(mPrefs.getBoolean(Emulator.pref_interrupt, Emulator.interrupt)); @@ -198,7 +197,7 @@ public class PGConfigFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE - || (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN)) { if (event == null || !event.isShiftPressed()) { String disk; diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/JNIdc.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/JNIdc.java index e1f6c2d90..4bcb93ead 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/JNIdc.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/JNIdc.java @@ -30,13 +30,13 @@ public final class JNIdc public static native void vmuSwap(); public static native void setupVmu(Object sip); public static native boolean getDynarec(); - public static native void dynarec(int dynarec); + public static native void dynarec(boolean dynarec); public static native boolean getIdleskip(); - public static native void idleskip(int idleskip); + public static native void idleskip(boolean idleskip); public static native boolean getUnstable(); - public static native void unstable(int unstable); + public static native void unstable(boolean unstable); public static native boolean getSafemode(); - public static native void safemode(int safemode); + public static native void safemode(boolean safemode); public static native int getCable(); public static native void cable(int cable); public static native int getRegion(); @@ -46,31 +46,31 @@ public final class JNIdc public static native int getLanguage(); public static native void language(int language); public static native boolean getLimitfps(); - public static native void limitfps(int limiter); + public static native void limitfps(boolean limiter); public static native boolean getNobatch(); - public static native void nobatch(int nobatch); + public static native void nobatch(boolean nobatch); public static native boolean getNosound(); - public static native void nosound(int noaudio); + public static native void nosound(boolean noaudio); public static native boolean getMipmaps(); - public static native void mipmaps(int mipmaps); + public static native void mipmaps(boolean mipmaps); public static native boolean getWidescreen(); - public static native void widescreen(int stretch); - public static native void subdivide(int subdivide); + public static native void widescreen(boolean stretch); + public static native void subdivide(boolean subdivide); public static native int getFrameskip(); public static native void frameskip(int frames); public static native int getPvrrender(); public static native void pvrrender(int render); public static native boolean getSyncedrender(); - public static native void syncedrender(int sync); + public static native void syncedrender(boolean sync); public static native boolean getModvols(); - public static native void modvols(int volumes); + public static native void modvols(boolean volumes); public static native boolean getClipping(); - public static native void clipping(int clipping); + public static native void clipping(boolean clipping); public static native void bootdisk(String disk); public static native boolean getUsereios(); - public static native void usereios(int reios); + public static native void usereios(boolean reios); public static native boolean getCustomtextures(); - public static native void customtextures(int customtex); + public static native void customtextures(boolean customtex); public static native boolean getShowfps(); public static native void showfps(boolean showfps); diff --git a/shell/android-studio/reicast/src/main/jni/src/Android.cpp b/shell/android-studio/reicast/src/main/jni/src/Android.cpp index bfd2c199d..c93f4eec1 100644 --- a/shell/android-studio/reicast/src/main/jni/src/Android.cpp +++ b/shell/android-studio/reicast/src/main/jni/src/Android.cpp @@ -69,28 +69,28 @@ JNIEXPORT jboolean JNICALL Java_com_reicast_emulator_emu_JNIdc_getUsereios(JNIEn JNIEXPORT jboolean JNICALL Java_com_reicast_emulator_emu_JNIdc_getCustomtextures(JNIEnv *env,jobject obj) __attribute__((visibility("default"))); JNIEXPORT jboolean JNICALL Java_com_reicast_emulator_emu_JNIdc_getShowfps(JNIEnv *env,jobject obj) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dynarec(JNIEnv *env,jobject obj, jint dynarec) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_idleskip(JNIEnv *env,jobject obj, jint idleskip) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_unstable(JNIEnv *env,jobject obj, jint unstable) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_safemode(JNIEnv *env,jobject obj, jint safemode) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dynarec(JNIEnv *env,jobject obj, jboolean dynarec) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_idleskip(JNIEnv *env,jobject obj, jboolean idleskip) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_unstable(JNIEnv *env,jobject obj, jboolean unstable) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_safemode(JNIEnv *env,jobject obj, jboolean safemode) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cable(JNIEnv *env,jobject obj, jint cable) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_region(JNIEnv *env,jobject obj, jint region) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_broadcast(JNIEnv *env,jobject obj, jint broadcast) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_language(JNIEnv *env,jobject obj, jint language) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nobatch(JNIEnv *env,jobject obj, jint nobatch) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nosound(JNIEnv *env,jobject obj, jint noaudio) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_mipmaps(JNIEnv *env,jobject obj, jint mipmaps) __attribute__((visibility("default"))); -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch) __attribute__((visibility("default"))); -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_limitfps(JNIEnv *env,jobject obj, jboolean limiter) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nobatch(JNIEnv *env,jobject obj, jboolean nobatch) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nosound(JNIEnv *env,jobject obj, jboolean noaudio) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_mipmaps(JNIEnv *env,jobject obj, jboolean mipmaps) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_widescreen(JNIEnv *env,jobject obj, jboolean stretch) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_subdivide(JNIEnv *env,jobject obj, jboolean 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_modvols(JNIEnv *env,jobject obj, jint volumes) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_syncedrender(JNIEnv *env,jobject obj, jboolean sync) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_modvols(JNIEnv *env,jobject obj, jboolean volumes) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_clipping(JNIEnv *env,jobject obj, jboolean clipping) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_bootdisk(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_customtextures(JNIEnv *env,jobject obj, jint customtex) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_usereios(JNIEnv *env,jobject obj, jboolean reios) __attribute__((visibility("default"))); +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_customtextures(JNIEnv *env,jobject obj, jboolean customtex) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_showfps(JNIEnv *env,jobject obj, jboolean showfps) __attribute__((visibility("default"))); JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_screenDpi(JNIEnv *env,jobject obj, jint screenDpi) __attribute__((visibility("default"))); @@ -203,22 +203,22 @@ JNIEXPORT jboolean JNICALL Java_com_reicast_emulator_emu_JNIdc_getShowfps(JNIEnv return settings.rend.ShowFPS; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dynarec(JNIEnv *env,jobject obj, jint dynarec) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dynarec(JNIEnv *env,jobject obj, jboolean dynarec) { settings.dynarec.Enable = dynarec; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_idleskip(JNIEnv *env,jobject obj, jint idleskip) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_idleskip(JNIEnv *env,jobject obj, jboolean idleskip) { settings.dynarec.idleskip = idleskip; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_unstable(JNIEnv *env,jobject obj, jint unstable) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_unstable(JNIEnv *env,jobject obj, jboolean unstable) { settings.dynarec.unstable_opt = unstable; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_safemode(JNIEnv *env,jobject obj, jint safemode) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_safemode(JNIEnv *env,jobject obj, jboolean safemode) { settings.dynarec.safemode = safemode; } @@ -243,32 +243,32 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_language(JNIEnv *env, settings.dreamcast.language = language; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_limitfps(JNIEnv *env,jobject obj, jboolean limiter) { settings.aica.LimitFPS = limiter; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nobatch(JNIEnv *env,jobject obj, jint nobatch) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nobatch(JNIEnv *env,jobject obj, jboolean nobatch) { settings.aica.NoBatch = nobatch; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nosound(JNIEnv *env,jobject obj, jint noaudio) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nosound(JNIEnv *env,jobject obj, jboolean noaudio) { settings.aica.NoSound = noaudio; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_mipmaps(JNIEnv *env,jobject obj, jint mipmaps) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_mipmaps(JNIEnv *env,jobject obj, jboolean mipmaps) { settings.rend.UseMipmaps = mipmaps; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_widescreen(JNIEnv *env,jobject obj, jboolean stretch) { settings.rend.WideScreen = stretch; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_subdivide(JNIEnv *env,jobject obj, jint subdivide) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_subdivide(JNIEnv *env,jobject obj, jboolean subdivide) { settings.pvr.subdivide_transp = subdivide; } @@ -283,12 +283,12 @@ 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) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_syncedrender(JNIEnv *env,jobject obj, jboolean sync) { settings.pvr.SynchronousRender = sync; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_modvols(JNIEnv *env,jobject obj, jint volumes) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_modvols(JNIEnv *env,jobject obj, jboolean volumes) { settings.rend.ModifierVolumes = volumes; } @@ -298,12 +298,12 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_clipping(JNIEnv *env, settings.rend.Clipping = clipping; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_usereios(JNIEnv *env,jobject obj, jint reios) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_usereios(JNIEnv *env,jobject obj, jboolean reios) { settings.bios.UseReios = reios; } -JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_customtextures(JNIEnv *env,jobject obj, jint customtex) +JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_customtextures(JNIEnv *env,jobject obj, jboolean customtex) { settings.rend.CustomTextures = customtex; } 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 e03c2c110..692ad870e 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 @@ -748,34 +748,6 @@ - - - - - - - - - - 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 dbb8dd666..7630e8c9e 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 @@ -748,34 +748,6 @@ - - - - - - - - - -