parent
f3416fda81
commit
208bcc0d79
|
@ -27,8 +27,6 @@ extern u32 vks[4];
|
||||||
extern s8 joyx[4],joyy[4];
|
extern s8 joyx[4],joyy[4];
|
||||||
extern u8 rt[4],lt[4];
|
extern u8 rt[4],lt[4];
|
||||||
|
|
||||||
bool micpluggedin = false;
|
|
||||||
|
|
||||||
u8 GetBtFromSgn(s8 val)
|
u8 GetBtFromSgn(s8 val)
|
||||||
{
|
{
|
||||||
return val+128;
|
return val+128;
|
||||||
|
@ -74,15 +72,7 @@ void mcfg_CreateDevices()
|
||||||
|
|
||||||
#ifdef HAS_VMU
|
#ifdef HAS_VMU
|
||||||
mcfg_Create(MDT_SegaVMU,0,0);
|
mcfg_Create(MDT_SegaVMU,0,0);
|
||||||
if(micpluggedin){
|
mcfg_Create(MDT_SegaVMU,0,1);
|
||||||
LOGI("maple_cfg::mcfg_CreateDevices micpluggedin!");
|
|
||||||
mcfg_Create(MDT_Microphone,0,1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOGI("maple_cfg::mcfg_CreateDevices mic NOT plugged in");
|
|
||||||
mcfg_Create(MDT_SegaVMU,0,1);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ bool gles_init();
|
||||||
|
|
||||||
//extern cResetEvent rs,re;
|
//extern cResetEvent rs,re;
|
||||||
extern int screen_width,screen_height;
|
extern int screen_width,screen_height;
|
||||||
extern bool micpluggedin;
|
|
||||||
|
|
||||||
static u64 tvs_base;
|
static u64 tvs_base;
|
||||||
static char CurFileName[256];
|
static char CurFileName[256];
|
||||||
|
@ -215,7 +214,7 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobj
|
||||||
{
|
{
|
||||||
sipemu = env->NewGlobalRef(sip);
|
sipemu = env->NewGlobalRef(sip);
|
||||||
getmicdata = env->GetMethodID(env->GetObjectClass(sipemu),"getData","()[B");
|
getmicdata = env->GetMethodID(env->GetObjectClass(sipemu),"getData","()[B");
|
||||||
micpluggedin = true;
|
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_JNIdc_stop(JNIEnv *env,jobject obj)
|
||||||
|
|
|
@ -313,14 +313,6 @@ public class GL2JNIActivity extends Activity {
|
||||||
} else {
|
} else {
|
||||||
runCompatibilityMode();
|
runCompatibilityMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
//setup mic
|
|
||||||
boolean micPluggedIn = prefs.getBoolean("mic_plugged_in", false);
|
|
||||||
if(micPluggedIn){
|
|
||||||
SipEmulator sip = new SipEmulator();
|
|
||||||
sip.startRecording();
|
|
||||||
JNIdc.setupMic(sip);
|
|
||||||
}
|
|
||||||
|
|
||||||
// When viewing a resource, pass its URI to the native code for opening
|
// When viewing a resource, pass its URI to the native code for opening
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
|
@ -334,6 +326,13 @@ public class GL2JNIActivity extends Activity {
|
||||||
Toast.makeText(getApplicationContext(),
|
Toast.makeText(getApplicationContext(),
|
||||||
"Press the back button for a menu", Toast.LENGTH_SHORT).show();
|
"Press the back button for a menu", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
//setup mic
|
||||||
|
boolean micPluggedIn = prefs.getBoolean("mic_plugged_in", false);
|
||||||
|
if(micPluggedIn){
|
||||||
|
SipEmulator sip = new SipEmulator();
|
||||||
|
sip.startRecording();
|
||||||
|
JNIdc.setupMic(sip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void runCompatibilityMode() {
|
private void runCompatibilityMode() {
|
||||||
|
|
Loading…
Reference in New Issue