void mcfg_CreateDevices() { #if DC_PLATFORM == DC_PLATFORM_DREAMCAST #if defined(USE_EVDEV) int i, deviceId, size_needed; for(i = 0; i < 4; i++) { size_needed = snprintf(NULL, 0, EVDEV_DEVICE_CONFIG_KEY, i+1) + 1; char* evdev_config_key = (char*)malloc(size_needed); sprintf(evdev_config_key, EVDEV_DEVICE_CONFIG_KEY, i+1); deviceId = cfgLoadInt("input", evdev_config_key, EVDEV_DEFAULT_DEVICE_ID(i+1)); free(evdev_config_key); if (deviceId >= 0) { mcfg_Create(MDT_SegaController,i,5); } } #else mcfg_Create(MDT_SegaController,0,5); #endif mcfg_Create(MDT_SegaVMU,0,0); mcfg_Create(MDT_SegaVMU,0,1); #else mcfg_Create(MDT_NaomiJamma, 0, 5); #endif }
void mcfg_CreateDevices() { mcfg_Create(MDT_SegaController,0,5); mcfg_Create(MDT_SegaVMU,0,0); mcfg_Create(MDT_SegaVMU,0,1); }
void mcfg_CreateDevices() { mcfg_Create(MDT_SegaController,0,5); #ifdef HAS_VMU mcfg_Create(MDT_SegaVMU,0,0); mcfg_Create(MDT_SegaVMU,0,1); #endif }
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"); delete MapleDevices[0][1]; mcfg_Create(MDT_Microphone,0,1); }
// // Native thread that runs the actual nullDC emulator // static void *ThreadHandler(void *UserData) { char *Args[3]; const char *P; // Make up argument list P = (const char *)UserData; Args[0] = "dc"; Args[1] = "-config"; Args[2] = P&&P[0]? (char *)malloc(strlen(P)+32):0; if(Args[2]) { strcpy(Args[2],"config:image="); strcat(Args[2],P); } // Add additonal controllers for (int i = 0; i < 3; i++) { if (add_controllers[i]) mcfg_Create(MDT_SegaController,i+1,5); } // Run nullDC emulator dc_init(Args[2]? 3:1,Args); }
void mcfg_CreateDevices() { int numberOfControl = cfgLoadInt("players", "nb", 1); #if DC_PLATFORM == DC_PLATFORM_DREAMCAST if (numberOfControl <= 0) numberOfControl = 1; if (numberOfControl > 4) numberOfControl = 4; for (int i = 0; i < numberOfControl; i++){ mcfg_Create(MDT_SegaController, i, 5); } mcfg_Create(MDT_SegaVMU,0,0); mcfg_Create(MDT_SegaVMU,0,1); #else mcfg_Create(MDT_NaomiJamma, 0, 5); #endif }