commit
19dc9e2247
|
@ -703,6 +703,7 @@ static inline void do_nada(...) { }
|
|||
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
|
||||
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
|
||||
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
|
||||
#ifdef STRIP_TEXT
|
||||
#define puts do_nada
|
||||
#define printf do_nada
|
||||
|
|
|
@ -26,12 +26,11 @@ maximum size of a Maple Bus packet is 256 words (1024 bytes)
|
|||
|
||||
================
|
||||
Games that can use mic:
|
||||
-Seaman
|
||||
-Seaman [tested, working!]
|
||||
-Alien Front Online
|
||||
-Planet Ring
|
||||
-Mr Driller
|
||||
-Otoire
|
||||
-Mr Driller [tested, working!] (lol @ telling mr driller to dig)
|
||||
-Otoire [tested, working!]
|
||||
-Propeller Arena
|
||||
-Visual Park
|
||||
-Kiteretsu Boys Gangagan
|
||||
|
||||
-Kiteretsu Boys Gangagan
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <android/log.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES2/gl2.h>
|
||||
|
@ -38,6 +39,7 @@ extern "C"
|
|||
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_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")));
|
||||
};
|
||||
|
||||
|
||||
|
@ -224,6 +226,23 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_stop(JNIEnv *env,jobject
|
|||
dc_term();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobject obj)
|
||||
{
|
||||
LOGD("vmuSwap go!");
|
||||
|
||||
maple_device* olda = MapleDevices[0][0];
|
||||
maple_device* oldb = MapleDevices[0][1];
|
||||
MapleDevices[0][0] = NULL;
|
||||
MapleDevices[0][1] = NULL;
|
||||
usleep(50000);//50 ms, wait for host to detect disconnect
|
||||
|
||||
MapleDevices[0][0] = oldb;
|
||||
MapleDevices[0][1] = olda;
|
||||
|
||||
LOGD("vmuSwap done");
|
||||
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_com_reicast_emulator_JNIdc_send(JNIEnv *env,jobject obj,jint cmd, jint param)
|
||||
{
|
||||
if (cmd==0)
|
||||
|
|
|
@ -90,31 +90,34 @@ public class GL2JNIActivity extends Activity {
|
|||
GL2JNIActivity.this.finish();
|
||||
}
|
||||
}), params);
|
||||
|
||||
//TODO comment what these do
|
||||
//TODO update these icons
|
||||
|
||||
hlay.addView(addbut(R.drawable.config, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.send(0, 0);
|
||||
JNIdc.send(0, 0); //Killing texture cache
|
||||
popUp.dismiss();
|
||||
}
|
||||
}), params);
|
||||
|
||||
hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.send(1, 3000);
|
||||
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);
|
||||
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);
|
||||
JNIdc.send(0, 1); //settings.pvr.ta_skip
|
||||
popUp.dismiss();
|
||||
}
|
||||
}), params);
|
||||
|
@ -122,6 +125,13 @@ public class GL2JNIActivity extends Activity {
|
|||
hlay.addView(addbut(R.drawable.profiler, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.send(0, 2);
|
||||
popUp.dismiss(); //print_stats=true;
|
||||
}
|
||||
}), params);
|
||||
|
||||
hlay.addView(addbut(R.drawable.input, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.vmuSwap();
|
||||
popUp.dismiss();
|
||||
}
|
||||
}), params);
|
||||
|
|
|
@ -24,6 +24,7 @@ public class JNIdc
|
|||
public static native void initControllers(boolean[] controllers);
|
||||
|
||||
public static native void setupMic(Object sip);
|
||||
public static native void vmuSwap();
|
||||
|
||||
public static void show_osd() {
|
||||
JNIdc.vjoy(13, 1,0,0,0);
|
||||
|
|
Loading…
Reference in New Issue