diff --git a/shell/android/AndroidManifest.xml b/shell/android/AndroidManifest.xml
index 338cdce94..52e09e2ed 100644
--- a/shell/android/AndroidManifest.xml
+++ b/shell/android/AndroidManifest.xml
@@ -44,7 +44,7 @@
@@ -91,7 +91,7 @@
diff --git a/shell/android/jni/src/Android.cpp b/shell/android/jni/src/Android.cpp
index 233a6c3f8..4d4c7e931 100644
--- a/shell/android/jni/src/Android.cpp
+++ b/shell/android/jni/src/Android.cpp
@@ -21,114 +21,114 @@
extern "C"
{
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_config(JNIEnv *env,jobject obj,jstring dirName) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_init(JNIEnv *env,jobject obj,jstring fileName) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_run(JNIEnv *env,jobject obj,jobject track) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_stop(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_config(JNIEnv *env,jobject obj,jstring dirName) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_init(JNIEnv *env,jobject obj,jstring fileName) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_run(JNIEnv *env,jobject obj,jobject track) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_stop(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
- JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_send(JNIEnv *env,jobject obj,jint id, jint v) __attribute__((visibility("default")));
- JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_data(JNIEnv *env,jobject obj,jint id, jbyteArray d) __attribute__((visibility("default")));
+ JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_send(JNIEnv *env,jobject obj,jint id, jint v) __attribute__((visibility("default")));
+ JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_data(JNIEnv *env,jobject obj,jint id, jbyteArray d) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv *env,jobject obj,jint w,jint h) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendframe(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_rendinit(JNIEnv *env,jobject obj,jint w,jint h) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_rendframe(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_kcode(JNIEnv * env, jobject obj, jintArray k_code, jintArray l_t, jintArray r_t, jintArray jx, jintArray jy) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vjoy(JNIEnv * env, jobject obj,u32 id,float x, float y, float w, float h) __attribute__((visibility("default")));
- //JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_play(JNIEnv *env,jobject obj,jshortArray result,jint size);
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_kcode(JNIEnv * env, jobject obj, jintArray k_code, jintArray l_t, jintArray r_t, jintArray jx, jintArray jy) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_vjoy(JNIEnv * env, jobject obj,u32 id,float x, float y, float w, float h) __attribute__((visibility("default")));
+ //JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_play(JNIEnv *env,jobject obj,jshortArray result,jint size);
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_initControllers(JNIEnv *env, jobject obj, jbooleanArray controllers) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_initControllers(JNIEnv *env, jobject obj, jbooleanArray controllers) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_vmuSwap(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_dynarec(JNIEnv *env,jobject obj, jint dynarec) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_idleskip(JNIEnv *env,jobject obj, jint idleskip) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_unstable(JNIEnv *env,jobject obj, jint unstable) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_cable(JNIEnv *env,jobject obj, jint cable) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_region(JNIEnv *env,jobject obj, jint region) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_broadcast(JNIEnv *env,jobject obj, jint broadcast) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_nobatch(JNIEnv *env,jobject obj, jint nobatch) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_mipmaps(JNIEnv *env,jobject obj, jint mipmaps) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_subdivide(JNIEnv *env,jobject obj, jint subdivide) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_pvrrender(JNIEnv *env,jobject obj, jint render) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk) __attribute__((visibility("default")));
- JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_dreamtime(JNIEnv *env,jobject obj, u32 clock) __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_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_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_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_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_cheatdisk(JNIEnv *env,jobject obj, jstring disk) __attribute__((visibility("default")));
+ JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dreamtime(JNIEnv *env,jobject obj, u32 clock) __attribute__((visibility("default")));
};
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_dynarec(JNIEnv *env,jobject obj, jint dynarec)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dynarec(JNIEnv *env,jobject obj, jint dynarec)
{
settings.dynarec.Enable = dynarec;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_idleskip(JNIEnv *env,jobject obj, jint idleskip)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_idleskip(JNIEnv *env,jobject obj, jint idleskip)
{
settings.dynarec.idleskip = idleskip;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_unstable(JNIEnv *env,jobject obj, jint unstable)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_unstable(JNIEnv *env,jobject obj, jint unstable)
{
settings.dynarec.unstable_opt = unstable;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_cable(JNIEnv *env,jobject obj, jint cable)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cable(JNIEnv *env,jobject obj, jint cable)
{
settings.dreamcast.cable = cable;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_region(JNIEnv *env,jobject obj, jint region)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_region(JNIEnv *env,jobject obj, jint region)
{
settings.dreamcast.region = region;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_broadcast(JNIEnv *env,jobject obj, jint broadcast)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_broadcast(JNIEnv *env,jobject obj, jint broadcast)
{
settings.dreamcast.broadcast = broadcast;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter)
{
settings.aica.LimitFPS = limiter;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_nobatch(JNIEnv *env,jobject obj, jint nobatch)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_nobatch(JNIEnv *env,jobject obj, jint nobatch)
{
settings.aica.NoBatch = nobatch;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_mipmaps(JNIEnv *env,jobject obj, jint mipmaps)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_mipmaps(JNIEnv *env,jobject obj, jint mipmaps)
{
settings.rend.UseMipmaps = mipmaps;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch)
{
settings.rend.WideScreen = stretch;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_subdivide(JNIEnv *env,jobject obj, jint subdivide)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_subdivide(JNIEnv *env,jobject obj, jint subdivide)
{
settings.pvr.subdivide_transp = subdivide;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames)
{
settings.pvr.ta_skip = frames;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_pvrrender(JNIEnv *env,jobject obj, jint render)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_pvrrender(JNIEnv *env,jobject obj, jint render)
{
settings.pvr.rend = render;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_cheatdisk(JNIEnv *env,jobject obj, jstring disk)
{
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_dreamtime(JNIEnv *env,jobject obj, u32 clock)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_dreamtime(JNIEnv *env,jobject obj, u32 clock)
{
settings.dreamcast.RTC = clock;
}
@@ -238,7 +238,7 @@ void os_SetWindowText(char const *Text)
{
putinf(Text);
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_config(JNIEnv *env,jobject obj,jstring dirName)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_config(JNIEnv *env,jobject obj,jstring dirName)
{
// Set home directory based on User config
const char* D = dirName? env->GetStringUTFChars(dirName,0):0;
@@ -246,7 +246,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_config(JNIEnv *env,jobjec
printf("Home dir is: '%s'\n",GetPath("/").c_str());
env->ReleaseStringUTFChars(dirName,D);
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_init(JNIEnv *env,jobject obj,jstring fileName)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_init(JNIEnv *env,jobject obj,jstring fileName)
{
// Get filename string from Java
@@ -290,7 +290,7 @@ jobject track;
jobject sipemu;
jmethodID getmicdata;
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_run(JNIEnv *env,jobject obj,jobject trk)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_run(JNIEnv *env,jobject obj,jobject trk)
{
install_prof_handler(0);
@@ -303,7 +303,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_run(JNIEnv *env,jobject o
dc_run();
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip)
{
sipemu = env->NewGlobalRef(sip);
getmicdata = env->GetMethodID(env->GetObjectClass(sipemu),"getData","()[B");
@@ -311,12 +311,12 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobj
mcfg_Create(MDT_Microphone,0,1);
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_stop(JNIEnv *env,jobject obj)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_stop(JNIEnv *env,jobject obj)
{
dc_term();
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobject obj)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_vmuSwap(JNIEnv *env,jobject obj)
{
LOGD("vmuSwap go!");
@@ -333,7 +333,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobje
}
-JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_send(JNIEnv *env,jobject obj,jint cmd, jint param)
+JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_send(JNIEnv *env,jobject obj,jint cmd, jint param)
{
if (cmd==0)
{
@@ -366,7 +366,7 @@ JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_send(JNIEnv *env,jobject
}
}
-JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_data(JNIEnv *env,jobject obj,jint id, jbyteArray d)
+JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_data(JNIEnv *env,jobject obj,jint id, jbyteArray d)
{
if (id==1)
{
@@ -380,12 +380,12 @@ JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_data(JNIEnv *env,jobject
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendframe(JNIEnv *env,jobject obj)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_rendframe(JNIEnv *env,jobject obj)
{
while(!rend_single_frame()) ;
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_kcode(JNIEnv * env, jobject obj, jintArray k_code, jintArray l_t, jintArray r_t, jintArray jx, jintArray jy)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_kcode(JNIEnv * env, jobject obj, jintArray k_code, jintArray l_t, jintArray r_t, jintArray jx, jintArray jy)
{
jint *k_code_body = env->GetIntArrayElements(k_code, 0);
jint *l_t_body = env->GetIntArrayElements(l_t, 0);
@@ -409,7 +409,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_kcode(JNIEnv * env, jobje
env->ReleaseIntArrayElements(jy, jy_body, 0);
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv * env, jobject obj, jint w,jint h)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_rendinit(JNIEnv * env, jobject obj, jint w,jint h)
{
screen_width = w;
screen_height = h;
@@ -424,7 +424,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv * env, jo
install_prof_handler(1);
}
-JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vjoy(JNIEnv * env, jobject obj,u32 id,float x, float y, float w, float h)
+JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_JNIdc_vjoy(JNIEnv * env, jobject obj,u32 id,float x, float y, float w, float h)
{
if(idGetBooleanArrayElements(controllers, 0);
memcpy(add_controllers, controllers_body, 3);
diff --git a/shell/android/res/layout/configure_fragment.xml b/shell/android/res/layout/configure_fragment.xml
index 406174f12..b632f85e3 100644
--- a/shell/android/res/layout/configure_fragment.xml
+++ b/shell/android/res/layout/configure_fragment.xml
@@ -39,7 +39,7 @@
android:id="@+id/unstable_option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:focusable="true" />
+ android:focusable="true" />
@@ -135,6 +135,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -166,6 +269,19 @@
android:layout_marginTop="10dp"
android:gravity="center_vertical" >
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/shell/android/res/values/strings.xml b/shell/android/res/values/strings.xml
index da7bdeef6..6ee561f61 100644
--- a/shell/android/res/values/strings.xml
+++ b/shell/android/res/values/strings.xml
@@ -16,6 +16,7 @@
BOOT BIOS
SELECT CURRENT FOLDER
+ Optimization and Debugging Options
Experimental (May cause widespread panic)
Dynarec Options
Unstable Optimisations
@@ -26,6 +27,7 @@
Frameskip Value
PVR Rendering (does nothing for now)
Force Software Rendering
+ Enable Emulator Sound
Force v6 GPU Config
Set Default Disk
Show BIOS Debug Tools
diff --git a/shell/android/src/com/reicast/emulator/AboutFragment.java b/shell/android/src/com/reicast/emulator/AboutFragment.java
index b0f3a2d20..3976291c2 100644
--- a/shell/android/src/com/reicast/emulator/AboutFragment.java
+++ b/shell/android/src/com/reicast/emulator/AboutFragment.java
@@ -92,6 +92,8 @@ import android.widget.SlidingDrawer.OnDrawerOpenListener;
import android.widget.TextView;
import android.widget.Toast;
+import com.reicast.emulator.debug.GitAdapter;
+
public class AboutFragment extends Fragment {
SlidingDrawer slidingGithub;
diff --git a/shell/android/src/com/reicast/emulator/FileBrowser.java b/shell/android/src/com/reicast/emulator/FileBrowser.java
index edc7bb82b..fcdea4412 100644
--- a/shell/android/src/com/reicast/emulator/FileBrowser.java
+++ b/shell/android/src/com/reicast/emulator/FileBrowser.java
@@ -40,6 +40,8 @@ import android.widget.TextView;
import android.widget.Toast;
import com.android.util.FileUtils;
+import com.reicast.emulator.config.OptionsFragment;
+import com.reicast.emulator.emu.JNIdc;
public class FileBrowser extends Fragment {
diff --git a/shell/android/src/com/reicast/emulator/MainActivity.java b/shell/android/src/com/reicast/emulator/MainActivity.java
index f267d1c1b..ccce25311 100644
--- a/shell/android/src/com/reicast/emulator/MainActivity.java
+++ b/shell/android/src/com/reicast/emulator/MainActivity.java
@@ -29,6 +29,12 @@ import com.android.util.DreamTime;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnOpenListener;
import com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity;
+import com.reicast.emulator.config.ConfigureFragment;
+import com.reicast.emulator.config.InputFragment;
+import com.reicast.emulator.config.OptionsFragment;
+import com.reicast.emulator.debug.GenerateLogs;
+import com.reicast.emulator.emu.GL2JNIActivity;
+import com.reicast.emulator.emu.JNIdc;
public class MainActivity extends SlidingFragmentActivity implements
FileBrowser.OnItemSelectedListener, OptionsFragment.OnClickListener {
diff --git a/shell/android/src/com/reicast/emulator/ConfigureFragment.java b/shell/android/src/com/reicast/emulator/config/ConfigureFragment.java
similarity index 94%
rename from shell/android/src/com/reicast/emulator/ConfigureFragment.java
rename to shell/android/src/com/reicast/emulator/config/ConfigureFragment.java
index fc8a14155..c9ace3fec 100644
--- a/shell/android/src/com/reicast/emulator/ConfigureFragment.java
+++ b/shell/android/src/com/reicast/emulator/config/ConfigureFragment.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.config;
import java.io.File;
import java.io.FileOutputStream;
@@ -34,6 +34,11 @@ import android.widget.TextView;
import android.widget.Toast;
import com.android.util.DreamTime;
+import com.reicast.emulator.MainActivity;
+import com.reicast.emulator.R;
+import com.reicast.emulator.debug.GenerateLogs;
+import com.reicast.emulator.emu.GL2JNIView;
+import com.reicast.emulator.emu.JNIdc;
import de.ankri.views.Switch;
@@ -139,6 +144,24 @@ public class ConfigureFragment extends Fragment {
force_software_opt.setChecked(false);
}
force_software_opt.setOnCheckedChangeListener(force_software);
+
+ Switch sound_opt = (Switch) getView().findViewById(
+ R.id.sound_option);
+ OnCheckedChangeListener emu_sound = new OnCheckedChangeListener() {
+
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+ mPrefs.edit().putBoolean("sound_enabled", isChecked).commit();
+ }
+ };
+ boolean sound = mPrefs.getBoolean("sound_enabled",
+ true);
+ if (sound) {
+ sound_opt.setChecked(true);
+ } else {
+ sound_opt.setChecked(false);
+ }
+ sound_opt.setOnCheckedChangeListener(emu_sound);
OnCheckedChangeListener dynarec_options = new OnCheckedChangeListener() {
diff --git a/shell/android/src/com/reicast/emulator/EditVJoyActivity.java b/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java
similarity index 92%
rename from shell/android/src/com/reicast/emulator/EditVJoyActivity.java
rename to shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java
index 974708b98..01a5a7fff 100644
--- a/shell/android/src/com/reicast/emulator/EditVJoyActivity.java
+++ b/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.config;
import android.annotation.TargetApi;
import android.app.Activity;
@@ -18,6 +18,13 @@ import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.Toast;
+import com.reicast.emulator.MainActivity;
+import com.reicast.emulator.R;
+import com.reicast.emulator.emu.GL2JNIView;
+import com.reicast.emulator.emu.JNIdc;
+import com.reicast.emulator.emu.OnScreenMenu;
+import com.reicast.emulator.emu.VJoy;
+
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
public class EditVJoyActivity extends Activity {
GL2JNIView mView;
diff --git a/shell/android/src/com/reicast/emulator/InputFragment.java b/shell/android/src/com/reicast/emulator/config/InputFragment.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/InputFragment.java
rename to shell/android/src/com/reicast/emulator/config/InputFragment.java
index 59bf7e2a4..ca46c0049 100644
--- a/shell/android/src/com/reicast/emulator/InputFragment.java
+++ b/shell/android/src/com/reicast/emulator/config/InputFragment.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.config;
import android.app.Activity;
import android.app.AlertDialog;
@@ -29,6 +29,9 @@ import com.bda.controller.Controller;
import com.bda.controller.ControllerListener;
import com.bda.controller.MotionEvent;
import com.bda.controller.StateEvent;
+import com.reicast.emulator.MainActivity;
+import com.reicast.emulator.R;
+import com.reicast.emulator.emu.MOGAInput;
import de.ankri.views.Switch;
diff --git a/shell/android/src/com/reicast/emulator/InputModFragment.java b/shell/android/src/com/reicast/emulator/config/InputModFragment.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/InputModFragment.java
rename to shell/android/src/com/reicast/emulator/config/InputModFragment.java
index 9356f1988..ece965b2a 100644
--- a/shell/android/src/com/reicast/emulator/InputModFragment.java
+++ b/shell/android/src/com/reicast/emulator/config/InputModFragment.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.config;
import java.io.IOException;
import java.io.InputStream;
@@ -29,6 +29,9 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
+
+import com.reicast.emulator.R;
+
import de.ankri.views.Switch;
public class InputModFragment extends Fragment {
diff --git a/shell/android/src/com/reicast/emulator/OptionsFragment.java b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java
similarity index 97%
rename from shell/android/src/com/reicast/emulator/OptionsFragment.java
rename to shell/android/src/com/reicast/emulator/config/OptionsFragment.java
index 2e978ead8..aead55b13 100644
--- a/shell/android/src/com/reicast/emulator/OptionsFragment.java
+++ b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.config;
import java.io.File;
@@ -16,6 +16,9 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
+import com.reicast.emulator.MainActivity;
+import com.reicast.emulator.R;
+
public class OptionsFragment extends Fragment {
Activity parentActivity;
diff --git a/shell/android/src/com/reicast/emulator/GenerateLogs.java b/shell/android/src/com/reicast/emulator/debug/GenerateLogs.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/GenerateLogs.java
rename to shell/android/src/com/reicast/emulator/debug/GenerateLogs.java
index 1532713be..6733360fc 100644
--- a/shell/android/src/com/reicast/emulator/GenerateLogs.java
+++ b/shell/android/src/com/reicast/emulator/debug/GenerateLogs.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.debug;
import java.io.BufferedReader;
import java.io.BufferedWriter;
diff --git a/shell/android/src/com/reicast/emulator/GitAdapter.java b/shell/android/src/com/reicast/emulator/debug/GitAdapter.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/GitAdapter.java
rename to shell/android/src/com/reicast/emulator/debug/GitAdapter.java
index 5c76d2a09..3dd7d5b85 100644
--- a/shell/android/src/com/reicast/emulator/GitAdapter.java
+++ b/shell/android/src/com/reicast/emulator/debug/GitAdapter.java
@@ -53,7 +53,7 @@
* subject to to the terms and conditions of the Apache License, Version 2.0.
*/
-package com.reicast.emulator;
+package com.reicast.emulator.debug;
import java.util.ArrayList;
import java.util.HashMap;
@@ -84,6 +84,7 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
+import com.reicast.emulator.R;
public class GitAdapter extends BaseAdapter {
diff --git a/shell/android/src/com/reicast/emulator/UploadLogs.java b/shell/android/src/com/reicast/emulator/debug/UploadLogs.java
similarity index 98%
rename from shell/android/src/com/reicast/emulator/UploadLogs.java
rename to shell/android/src/com/reicast/emulator/debug/UploadLogs.java
index 8caa31b6a..daa00137f 100644
--- a/shell/android/src/com/reicast/emulator/UploadLogs.java
+++ b/shell/android/src/com/reicast/emulator/debug/UploadLogs.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.debug;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -22,6 +22,8 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
+import com.reicast.emulator.R;
+
public class UploadLogs extends AsyncTask {
diff --git a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java b/shell/android/src/com/reicast/emulator/emu/GL2JNIActivity.java
similarity index 95%
rename from shell/android/src/com/reicast/emulator/GL2JNIActivity.java
rename to shell/android/src/com/reicast/emulator/emu/GL2JNIActivity.java
index 06fd64374..17cce0aa4 100644
--- a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java
+++ b/shell/android/src/com/reicast/emulator/emu/GL2JNIActivity.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import java.util.Arrays;
import java.util.HashMap;
@@ -23,9 +23,12 @@ import android.view.Window;
import android.widget.PopupWindow;
import android.widget.Toast;
+import com.reicast.emulator.R;
+import com.reicast.emulator.config.ConfigureFragment;
+
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
public class GL2JNIActivity extends Activity {
- GL2JNIView mView;
+ public GL2JNIView mView;
OnScreenMenu menu;
PopupWindow popUp;
MOGAInput moga = new MOGAInput();
@@ -470,13 +473,31 @@ public class GL2JNIActivity extends Activity {
}
public void displayPopUp(PopupWindow popUp) {
- popUp.showAtLocation(mView, Gravity.BOTTOM, 0, 0);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ popUp.showAtLocation(mView, Gravity.BOTTOM, 0, 60);
+ } else {
+ popUp.showAtLocation(mView, Gravity.BOTTOM, 0, 0);
+ }
popUp.update(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
}
+ public void displayDebug(PopupWindow popUpDebug) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ popUpDebug.showAtLocation(mView, Gravity.BOTTOM, 0, 60);
+ } else {
+ popUpDebug.showAtLocation(mView, Gravity.BOTTOM, 0, 0);
+ }
+ popUpDebug.update(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT);
+ }
+
public void displayConfig(PopupWindow popUpConfig) {
- popUpConfig.showAtLocation(mView, Gravity.BOTTOM, 0, 0);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ popUpConfig.showAtLocation(mView, Gravity.BOTTOM, 0, 60);
+ } else {
+ popUpConfig.showAtLocation(mView, Gravity.BOTTOM, 0, 0);
+ }
popUpConfig.update(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
}
diff --git a/shell/android/src/com/reicast/emulator/GL2JNIView.java b/shell/android/src/com/reicast/emulator/emu/GL2JNIView.java
similarity index 97%
rename from shell/android/src/com/reicast/emulator/GL2JNIView.java
rename to shell/android/src/com/reicast/emulator/emu/GL2JNIView.java
index 3a8f9adcc..beb793ac9 100644
--- a/shell/android/src/com/reicast/emulator/GL2JNIView.java
+++ b/shell/android/src/com/reicast/emulator/emu/GL2JNIView.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import java.lang.reflect.InvocationTargetException;
@@ -28,6 +28,8 @@ import android.view.ScaleGestureDetector;
import android.view.ScaleGestureDetector.SimpleOnScaleGestureListener;
import android.view.View;
+import com.reicast.emulator.MainActivity;
+
/**
* A simple GLSurfaceView sub-class that demonstrate how to perform
@@ -48,11 +50,11 @@ import android.view.View;
* bit depths). Failure to do so would result in an EGL_BAD_MATCH error.
*/
-class GL2JNIView extends GLSurfaceView
+public class GL2JNIView extends GLSurfaceView
{
private static String fileName;
//private AudioThread audioThread;
- private EmuThread ethd = new EmuThread();
+ private EmuThread ethd;
public static final boolean DEBUG = false;
@@ -103,10 +105,9 @@ class GL2JNIView extends GLSurfaceView
Runtime.getRuntime().freeMemory();
System.gc();
-
- Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ ethd = new EmuThread(prefs.getBoolean("sound_enabled", true));
touchVibrationEnabled = prefs.getBoolean("touch_vibration_enabled", true);
int rederType = prefs.getInt("render_type", LAYER_TYPE_HARDWARE);
@@ -170,8 +171,9 @@ class GL2JNIView extends GLSurfaceView
// Initialize audio
//configAudio(44100,250);
-
+
ethd.start();
+
}
public GLSurfaceView.Renderer getRenderer()
@@ -304,8 +306,11 @@ class GL2JNIView extends GLSurfaceView
return -1; // Invalid
}
- static int[] kcode_raw = { 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF };
- static int[] lt = new int[4], rt = new int[4], jx = new int[4], jy = new int[4];
+ public static int[] kcode_raw = { 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF };
+ public static int[] lt = new int[4];
+ public static int[] rt = new int[4];
+ public static int[] jx = new int[4];
+ public static int[] jy = new int[4];
float editLastX = 0, editLastY = 0;
@@ -805,9 +810,15 @@ private static class ContextFactory implements GLSurfaceView.EGLContextFactory
AudioTrack Player;
long pos; //write position
long size; //size in frames
+ private boolean sound;
+
+ public EmuThread(boolean sound) {
+ this.sound = sound;
+ }
@Override public void run()
{
+ if (sound) {
int min=AudioTrack.getMinBufferSize(44100,AudioFormat.CHANNEL_OUT_STEREO,AudioFormat.ENCODING_PCM_16BIT);
if (2048>min)
@@ -827,12 +838,14 @@ private static class ContextFactory implements GLSurfaceView.EGLContextFactory
Log.i("audcfg", "Audio streaming: buffer size " + min + " samples / " + min/44100.0 + " ms");
Player.play();
+ }
JNIdc.run(this);
}
int WriteBuffer(short[] samples, int wait)
{
+ if (sound) {
int newdata=samples.length/2;
if (wait==0)
@@ -850,6 +863,7 @@ private static class ContextFactory implements GLSurfaceView.EGLContextFactory
pos+=newdata;
Player.write(samples, 0, samples.length);
+ }
return 1;
}
diff --git a/shell/android/src/com/reicast/emulator/GLCFactory6.java b/shell/android/src/com/reicast/emulator/emu/GLCFactory6.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/GLCFactory6.java
rename to shell/android/src/com/reicast/emulator/emu/GLCFactory6.java
index 783761986..e1fdc9aff 100644
--- a/shell/android/src/com/reicast/emulator/GLCFactory6.java
+++ b/shell/android/src/com/reicast/emulator/emu/GLCFactory6.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
diff --git a/shell/android/src/com/reicast/emulator/JNIdc.java b/shell/android/src/com/reicast/emulator/emu/JNIdc.java
similarity index 98%
rename from shell/android/src/com/reicast/emulator/JNIdc.java
rename to shell/android/src/com/reicast/emulator/emu/JNIdc.java
index 4c783d2b3..02b992704 100644
--- a/shell/android/src/com/reicast/emulator/JNIdc.java
+++ b/shell/android/src/com/reicast/emulator/emu/JNIdc.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
public class JNIdc
diff --git a/shell/android/src/com/reicast/emulator/MOGAInput.java b/shell/android/src/com/reicast/emulator/emu/MOGAInput.java
similarity index 97%
rename from shell/android/src/com/reicast/emulator/MOGAInput.java
rename to shell/android/src/com/reicast/emulator/emu/MOGAInput.java
index 26d46446a..c8dc7fb7b 100644
--- a/shell/android/src/com/reicast/emulator/MOGAInput.java
+++ b/shell/android/src/com/reicast/emulator/emu/MOGAInput.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
/******************************************************************************/
@@ -15,6 +15,7 @@ import com.bda.controller.ControllerListener;
import com.bda.controller.KeyEvent;
import com.bda.controller.MotionEvent;
import com.bda.controller.StateEvent;
+import com.reicast.emulator.R;
/******************************************************************************/
@@ -27,12 +28,12 @@ public class MOGAInput
static final int DELAY = 1000 / 50; // 50 Hz
- static final int ACTION_CONNECTED = Controller.ACTION_CONNECTED;
+ public static final int ACTION_CONNECTED = Controller.ACTION_CONNECTED;
static final int ACTION_DISCONNECTED = Controller.ACTION_DISCONNECTED;
static final int ACTION_VERSION_MOGA = Controller.ACTION_VERSION_MOGA;
static final int ACTION_VERSION_MOGAPRO = Controller.ACTION_VERSION_MOGAPRO;
- Controller mController = null;
+ public Controller mController = null;
private Handler handler;
private String notify;
@@ -107,7 +108,7 @@ public class MOGAInput
*/
}
- protected void onCreate(Activity act)
+ public void onCreate(Activity act)
{
this.act = act;
@@ -120,17 +121,17 @@ public class MOGAInput
mController.setListener(new ExampleControllerListener(), new Handler());
}
- protected void onDestroy()
+ public void onDestroy()
{
mController.exit();
}
- protected void onPause()
+ public void onPause()
{
mController.onPause();
}
- protected void onResume()
+ public void onResume()
{
mController.onResume();
diff --git a/shell/android/src/com/reicast/emulator/OnScreenMenu.java b/shell/android/src/com/reicast/emulator/emu/OnScreenMenu.java
similarity index 65%
rename from shell/android/src/com/reicast/emulator/OnScreenMenu.java
rename to shell/android/src/com/reicast/emulator/emu/OnScreenMenu.java
index fdd9f4b7d..e3f503b62 100644
--- a/shell/android/src/com/reicast/emulator/OnScreenMenu.java
+++ b/shell/android/src/com/reicast/emulator/emu/OnScreenMenu.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import java.io.File;
@@ -15,6 +15,10 @@ import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
+import com.reicast.emulator.MainActivity;
+import com.reicast.emulator.R;
+import com.reicast.emulator.config.ConfigureFragment;
+
public class OnScreenMenu {
private GL2JNIActivity mContext;
@@ -40,7 +44,7 @@ public class OnScreenMenu {
}
}
- PopupWindow createPopup() {
+ public PopupWindow createPopup() {
final PopupWindow popUp = new PopupWindow(mContext);
int p = getPixelsFromDp(60, mContext);
@@ -60,41 +64,13 @@ public class OnScreenMenu {
if (prefs.getBoolean("debug_profling_tools", false)) {
- hlay.addView(addbut(R.drawable.clear_cache, new OnClickListener() {
+ hlay.addView(addbut(R.drawable.disk_unknown, new OnClickListener() {
public void onClick(View v) {
- JNIdc.send(0, 0); // Killing texture cache
+ displayDebugPopup(popUp);
popUp.dismiss();
}
}), params);
- hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
- public void onClick(View v) {
- JNIdc.send(1, 3000); // sample_Start(param);
- popUp.dismiss();
- }
- }), params);
-
- hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
- public void onClick(View v) {
- JNIdc.send(1, 0); // sample_Start(param);
- popUp.dismiss();
- }
- }), params);
-
- // hlay.addView(addbut(R.drawable.disk_unknown, new
- // OnClickListener() {
- // public void onClick(View v) {
- // JNIdc.send(0, 1); //settings.pvr.ta_skip
- // popUp.dismiss();
- // }
- // }), params);
-
- hlay.addView(addbut(R.drawable.print_stats, new OnClickListener() {
- public void onClick(View v) {
- JNIdc.send(0, 2);
- popUp.dismiss(); // print_stats=true;
- }
- }), params);
}
hlay.addView(addbut(R.drawable.vmu_swap, new OnClickListener() {
public void onClick(View v) {
@@ -115,7 +91,68 @@ public class OnScreenMenu {
return popUp;
}
-
+ void displayDebugPopup(final PopupWindow popUp) {
+ final PopupWindow popUpDebug = new PopupWindow(mContext);
+
+ int p = getPixelsFromDp(60, mContext);
+ LayoutParams debugParams = new LayoutParams(p, p);
+
+ LinearLayout hlay = new LinearLayout(mContext);
+
+ hlay.setOrientation(LinearLayout.HORIZONTAL);
+
+ hlay.addView(addbut(R.drawable.close, new OnClickListener() {
+ public void onClick(View v) {
+ popUpDebug.dismiss();
+ }
+ }), debugParams);
+
+ hlay.addView(addbut(R.drawable.clear_cache, new OnClickListener() {
+ public void onClick(View v) {
+ JNIdc.send(0, 0); // Killing texture cache
+ popUpDebug.dismiss();
+ }
+ }), debugParams);
+
+ hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
+ public void onClick(View v) {
+ JNIdc.send(1, 3000); // sample_Start(param);
+ popUpDebug.dismiss();
+ }
+ }), debugParams);
+
+ hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
+ public void onClick(View v) {
+ JNIdc.send(1, 0); // sample_Start(param);
+ popUpDebug.dismiss();
+ }
+ }), debugParams);
+
+ // hlay.addView(addbut(R.drawable.disk_unknown, new
+ // OnClickListener() {
+ // public void onClick(View v) {
+ // JNIdc.send(0, 1); //settings.pvr.ta_skip
+ // popUp.dismiss();
+ // }
+ // }), debugParams);
+
+ hlay.addView(addbut(R.drawable.print_stats, new OnClickListener() {
+ public void onClick(View v) {
+ JNIdc.send(0, 2);
+ popUpDebug.dismiss(); // print_stats=true;
+ }
+ }), debugParams);
+
+ hlay.addView(addbut(R.drawable.up, new OnClickListener() {
+ public void onClick(View v) {
+ popUpDebug.dismiss();
+ mContext.displayPopUp(popUp);
+ }
+ }), debugParams);
+
+ popUpDebug.setContentView(hlay);
+ mContext.displayDebug(popUpDebug);
+ }
void displayConfigPopup(final PopupWindow popUp) {
final PopupWindow popUpConfig = new PopupWindow(mContext);
@@ -132,6 +169,7 @@ public class OnScreenMenu {
popUpConfig.dismiss();
}
}), configParams);
+
View fullscreen;
if (!widescreen) {
fullscreen = addbut(R.drawable.widescreen, new OnClickListener() {
@@ -151,6 +189,7 @@ public class OnScreenMenu {
});
}
hlay.addView(fullscreen, params);
+
View frames_up = addbut(R.drawable.frames_up, new OnClickListener() {
public void onClick(View v) {
frameskip++;
@@ -161,6 +200,7 @@ public class OnScreenMenu {
}
});
hlay.addView(frames_up, params);
+
if (frameskip >= 5) {
frames_up.setEnabled(false);
}
@@ -177,6 +217,7 @@ public class OnScreenMenu {
if (frameskip <= 0) {
frames_down.setEnabled(false);
}
+
View framelimit;
if (!limitframes) {
framelimit = addbut(R.drawable.frames_limit_on,
@@ -198,27 +239,31 @@ public class OnScreenMenu {
});
}
hlay.addView(framelimit, params);
- View audiosetting;
- if (!audiodisabled) {
- audiosetting = addbut(R.drawable.mute_sound,
- new OnClickListener() {
- public void onClick(View v) {
- mContext.mView.audioDisable(true);
- popUpConfig.dismiss();
- audiodisabled = true;
- }
- });
- } else {
- audiosetting = addbut(R.drawable.enable_sound,
- new OnClickListener() {
- public void onClick(View v) {
- mContext.mView.audioDisable(false);
- popUpConfig.dismiss();
- audiodisabled = false;
- }
- });
+
+ if (prefs.getBoolean("sound_enabled", true)) {
+ View audiosetting;
+ if (!audiodisabled) {
+ audiosetting = addbut(R.drawable.mute_sound,
+ new OnClickListener() {
+ public void onClick(View v) {
+ mContext.mView.audioDisable(true);
+ popUpConfig.dismiss();
+ audiodisabled = true;
+ }
+ });
+ } else {
+ audiosetting = addbut(R.drawable.enable_sound,
+ new OnClickListener() {
+ public void onClick(View v) {
+ mContext.mView.audioDisable(false);
+ popUpConfig.dismiss();
+ audiodisabled = false;
+ }
+ });
+ }
+ hlay.addView(audiosetting, params);
}
- hlay.addView(audiosetting, params);
+
hlay.addView(addbut(R.drawable.up, new OnClickListener() {
public void onClick(View v) {
popUpConfig.dismiss();
diff --git a/shell/android/src/com/reicast/emulator/SipEmulator.java b/shell/android/src/com/reicast/emulator/emu/SipEmulator.java
similarity index 98%
rename from shell/android/src/com/reicast/emulator/SipEmulator.java
rename to shell/android/src/com/reicast/emulator/emu/SipEmulator.java
index bb5afd88d..a20a029cc 100644
--- a/shell/android/src/com/reicast/emulator/SipEmulator.java
+++ b/shell/android/src/com/reicast/emulator/emu/SipEmulator.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import java.util.concurrent.ConcurrentLinkedQueue;
diff --git a/shell/android/src/com/reicast/emulator/VJoy.java b/shell/android/src/com/reicast/emulator/emu/VJoy.java
similarity index 99%
rename from shell/android/src/com/reicast/emulator/VJoy.java
rename to shell/android/src/com/reicast/emulator/emu/VJoy.java
index a516ce580..fdb60cadf 100644
--- a/shell/android/src/com/reicast/emulator/VJoy.java
+++ b/shell/android/src/com/reicast/emulator/emu/VJoy.java
@@ -1,4 +1,4 @@
-package com.reicast.emulator;
+package com.reicast.emulator.emu;
import android.content.Context;
import android.content.SharedPreferences;