From ace14ab3172ad90809a3cc5e8fe67d5cac9e294b Mon Sep 17 00:00:00 2001 From: cbransden Date: Mon, 9 May 2016 10:39:45 +0100 Subject: [PATCH] Added multitap core option & style nits --- frontend/libretro.c | 227 ++++++++++++++++++++---------------------- frontend/main.c | 6 +- frontend/plugin.c | 43 ++++---- frontend/plugin_lib.c | 2 - frontend/plugin_lib.h | 2 - libpcsxcore/plugins.c | 10 +- maemo/hildon.c | 22 ++-- 7 files changed, 141 insertions(+), 171 deletions(-) diff --git a/frontend/libretro.c b/frontend/libretro.c index d6922cb3..4486b958 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -25,6 +25,7 @@ #include "main.h" #include "plugin.h" #include "plugin_lib.h" +#include "arm_features.h" #include "revision.h" #include "libretro.h" @@ -53,19 +54,12 @@ extern char Mcd1Data[MCD_SIZE]; extern char McdDisable[2]; /* PCSX ReARMed core calls and stuff */ -//int in_type1, in_type2; -//int in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 }; -//int in_a3[2] = { 127, 127 }, in_a4[2] = { 127, 127 }; -//int in_keystate; - int in_type[8]; int in_analog_left[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }}; int in_analog_right[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }}; unsigned short in_keystate[8]; - - - - +int multitap1; +int multitap2; int in_enable_vibration = 1; /* PSX max resolution is 640x512, but with enhancement it's 1024x512 */ @@ -258,7 +252,7 @@ void pl_3ds_munmap(void *ptr, size_t size, enum psxMapTag tag) #endif static void *pl_mmap(unsigned int size) -{ +{ return psxMap(0, size, 0, MAP_TAG_VRAM); } @@ -337,13 +331,15 @@ void retro_set_environment(retro_environment_t cb) { "pcsx_rearmed_frameskip", "Frameskip; 0|1|2|3" }, { "pcsx_rearmed_region", "Region; Auto|NTSC|PAL" }, { "pcsx_rearmed_pad1type", "Pad 1 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad2type", "Pad 2 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad3type", "Pad 3 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad4type", "Pad 4 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad5type", "Pad 5 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad6type", "Pad 6 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad7type", "Pad 7 Type; standard|analog|negcon" }, - { "pcsx_rearmed_pad8type", "Pad 8 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad2type", "Pad 2 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad3type", "Pad 3 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad4type", "Pad 4 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad5type", "Pad 5 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad6type", "Pad 6 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad7type", "Pad 7 Type; standard|analog|negcon" }, + { "pcsx_rearmed_pad8type", "Pad 8 Type; standard|analog|negcon" }, + { "pcsx_rearmed_multitap1", "Multitap 1; disabled|enabled" }, + { "pcsx_rearmed_multitap2", "Multitap 2; disabled|enabled" }, #ifndef DRC_DISABLE { "pcsx_rearmed_drc", "Dynamic recompiler; enabled|disabled" }, #endif @@ -378,7 +374,7 @@ unsigned retro_api_version(void) void retro_set_controller_port_device(unsigned port, unsigned device) { - printf("port %u device %u",port,device); + SysPrintf("port %u device %u",port,device); } void retro_get_system_info(struct retro_system_info *info) @@ -403,8 +399,8 @@ void retro_get_system_av_info(struct retro_system_av_info *info) } /* savestates */ -size_t retro_serialize_size(void) -{ +size_t retro_serialize_size(void) +{ // it's currently 4380651-4397047 bytes, // but have some reserved for future return 0x440000; @@ -490,7 +486,7 @@ static void save_close(void *file) } bool retro_serialize(void *data, size_t size) -{ +{ int ret = SaveState(data); return ret == 0 ? true : false; } @@ -858,7 +854,7 @@ bool retro_load_game(const struct retro_game_info *info) { 5, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2, "R2" }, { 5, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3, "R3" }, { 5, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Select" }, - { 5, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, + { 5, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, { 5, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X, "Left Analog X" }, { 5, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Left Analog Y" }, { 5, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X, "Right Analog X" }, @@ -879,7 +875,7 @@ bool retro_load_game(const struct retro_game_info *info) { 6, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2, "R2" }, { 6, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3, "R3" }, { 6, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Select" }, - { 6, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, + { 6, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, { 6, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X, "Left Analog X" }, { 6, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Left Analog Y" }, { 6, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X, "Right Analog X" }, @@ -900,7 +896,7 @@ bool retro_load_game(const struct retro_game_info *info) { 7, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R2, "R2" }, { 7, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3, "R3" }, { 7, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Select" }, - { 7, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, + { 7, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "Start" }, { 7, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X, "Left Analog X" }, { 7, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Left Analog Y" }, { 7, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X, "Right Analog X" }, @@ -999,7 +995,7 @@ bool retro_load_game_special(unsigned game_type, const struct retro_game_info *i return false; } -void retro_unload_game(void) +void retro_unload_game(void) { } @@ -1052,10 +1048,9 @@ static const unsigned short retro_psx_map[] = { static void update_variables(bool in_flight) { struct retro_variable var; - + var.value = NULL; var.key = "pcsx_rearmed_frameskip"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) pl_rearmed_cbs.frameskip = atoi(var.value); @@ -1079,7 +1074,7 @@ static void update_variables(bool in_flight) in_type[0] = PSE_PAD_TYPE_STANDARD; if (strcmp(var.value, "analog") == 0) in_type[0] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) + else if (strcmp(var.value, "negcon") == 0) in_type[0] = PSE_PAD_TYPE_NEGCON; } @@ -1090,83 +1085,93 @@ static void update_variables(bool in_flight) in_type[1] = PSE_PAD_TYPE_STANDARD; if (strcmp(var.value, "analog") == 0) in_type[1] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) + else if (strcmp(var.value, "negcon") == 0) in_type[1] = PSE_PAD_TYPE_NEGCON; } - var.value = NULL; - var.key = "pcsx_rearmed_pad3type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) - { - in_type[2] = PSE_PAD_TYPE_STANDARD; - if (strcmp(var.value, "analog") == 0) - in_type[2] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[2] = PSE_PAD_TYPE_NEGCON; - } - - var.value = NULL; - var.key = "pcsx_rearmed_pad4type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value){ - in_type[3] = PSE_PAD_TYPE_STANDARD; - if (var.value != NULL){ - if (strcmp(var.value, "analog") == 0) - in_type[3] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[3] = PSE_PAD_TYPE_NEGCON; - } - } + var.value = NULL; + var.key = "pcsx_rearmed_pad3type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[2] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[2] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[2] = PSE_PAD_TYPE_NEGCON; + } - var.value = NULL; - var.key = "pcsx_rearmed_pad5type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) - { - in_type[4] = PSE_PAD_TYPE_STANDARD; - if (var.value != NULL){ - if (strcmp(var.value, "analog") == 0) - in_type[4] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[4] = PSE_PAD_TYPE_NEGCON; - } - } + var.value = NULL; + var.key = "pcsx_rearmed_pad4type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[3] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[3] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[3] = PSE_PAD_TYPE_NEGCON; + } - var.value = NULL; - var.key = "pcsx_rearmed_pad6type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value){ - in_type[5] = PSE_PAD_TYPE_STANDARD; - if (var.value != NULL){ - if (strcmp(var.value, "analog") == 0) - in_type[5] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[5] = PSE_PAD_TYPE_NEGCON; - } - } + var.value = NULL; + var.key = "pcsx_rearmed_pad5type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[4] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[4] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[4] = PSE_PAD_TYPE_NEGCON; + } - var.value = NULL; - var.key = "pcsx_rearmed_pad7type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value){ - in_type[6] = PSE_PAD_TYPE_STANDARD; - if (var.value != NULL){ - if (strcmp(var.value, "analog") == 0) - in_type[6] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[6] = PSE_PAD_TYPE_NEGCON; - } - } + var.value = NULL; + var.key = "pcsx_rearmed_pad6type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[5] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[5] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[5] = PSE_PAD_TYPE_NEGCON; + } - var.value = NULL; - var.key = "pcsx_rearmed_pad8type"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value){ - in_type[7] = PSE_PAD_TYPE_STANDARD; - if (var.value != NULL){ - if (strcmp(var.value, "analog") == 0) - in_type[7] = PSE_PAD_TYPE_ANALOGPAD; - if (strcmp(var.value, "negcon") == 0) - in_type[7] = PSE_PAD_TYPE_NEGCON; - } - } + var.value = NULL; + var.key = "pcsx_rearmed_pad7type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[6] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[6] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[6] = PSE_PAD_TYPE_NEGCON; + } + var.value = NULL; + var.key = "pcsx_rearmed_pad8type"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + in_type[7] = PSE_PAD_TYPE_STANDARD; + if (strcmp(var.value, "analog") == 0) + in_type[7] = PSE_PAD_TYPE_ANALOGPAD; + else if (strcmp(var.value, "negcon") == 0) + in_type[7] = PSE_PAD_TYPE_NEGCON; + } + var.value = NULL; + var.key = "pcsx_rearmed_multitap1"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + if (strcmp(var.value, "enabled") == 0) + multitap1 = 1; + else multitap1 = 0; + } + + var.value = NULL; + var.key = "pcsx_rearmed_multitap2"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) + { + if (strcmp(var.value, "enabled") == 0) + multitap2 = 1; + else multitap2 = 0; + } #ifdef __ARM_NEON__ var.value = "NULL"; @@ -1277,7 +1282,7 @@ static void update_variables(bool in_flight) else if (strcmp(var.value, "enabled") == 0) Config.RCntFix = 1; } - + var.value = "NULL"; var.key = "pcsx_rearmed_inuyasha_fix"; @@ -1302,10 +1307,10 @@ static void update_variables(bool in_flight) } } -void retro_run(void) +void retro_run(void) { - int i; + int i; input_poll_cb(); @@ -1313,26 +1318,11 @@ void retro_run(void) if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) update_variables(true); - - - // récupération de l'état des boutons par libretro - -// in_keystate = 0; -// for (i = 0; i < RETRO_PSX_MAP_LEN; i++){ -// if (input_state_cb(1, RETRO_DEVICE_JOYPAD, 0, i)) -// in_keystate |= retro_psx_map[i]; -// -// } -// in_keystate <<= 16; -// for (i = 0; i < RETRO_PSX_MAP_LEN; i++) -// if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i)) -// in_keystate |= retro_psx_map[i]; - - //reset all keystate, query from libretro for keystate + // reset all keystate, query from libretro for keystate int j; for(i=0;i<8;i++){ in_keystate[i] = 0; - //query from libretro for keystate + // query from libretro for keystate for (j = 0; j < RETRO_PSX_MAP_LEN; j++){ if (input_state_cb(i, RETRO_DEVICE_JOYPAD, 0, j)) in_keystate[i] |= retro_psx_map[j]; @@ -1475,7 +1465,7 @@ void retro_init(void) else { SysPrintf("no BIOS files found.\n"); - struct retro_message msg = + struct retro_message msg = { "no BIOS found, expect bugs!", 180 @@ -1490,9 +1480,8 @@ void retro_init(void) /* Set how much slower PSX CPU runs * 100 (so that 200 is 2 times) * we have to do this because cache misses and some IO penalties * are not emulated. Warning: changing this may break compatibility. */ -#if !defined(__arm__) || defined(__ARM_ARCH_7A__) cycle_multiplier = 175; -#else +#ifdef HAVE_PRE_ARMV7 cycle_multiplier = 200; #endif pl_rearmed_cbs.gpu_peops.iUseDither = 1; diff --git a/frontend/main.c b/frontend/main.c index 4d43549f..89e96e4a 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -26,6 +26,7 @@ #include "../libpcsxcore/new_dynarec/new_dynarec.h" #include "../plugins/cdrcimg/cdrcimg.h" #include "../plugins/dfsound/spu_config.h" +#include "arm_features.h" #include "revision.h" #ifndef NO_FRONTEND @@ -142,7 +143,7 @@ void emu_set_default_config(void) spu_config.iVolume = 768; spu_config.iTempo = 0; spu_config.iUseThread = 1; // no effect if only 1 core is detected -#if defined(__arm__) && !defined(__ARM_ARCH_7A__) /* XXX GPH hack */ +#ifdef HAVE_PRE_ARMV7 /* XXX GPH hack */ spu_config.iUseReverb = 0; spu_config.iUseInterpolation = 0; spu_config.iTempo = 1; @@ -771,7 +772,7 @@ int emu_save_state(int slot) return ret; ret = SaveState(fname); -#if defined(__arm__) && !defined(__ARM_ARCH_7A__) && !defined(_3DS) /* XXX GPH hack */ +#ifdef HAVE_PRE_ARMV7 /* XXX GPH hack */ sync(); #endif SysPrintf("* %s \"%s\" [%d]\n", @@ -1029,4 +1030,3 @@ void SysCloseLibrary(void *lib) { dlclose(lib); #endif } - diff --git a/frontend/plugin.c b/frontend/plugin.c index acc56011..d7134528 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -49,37 +49,30 @@ extern void CALLBACK SPUasync(unsigned int, unsigned int); extern int CALLBACK SPUplayCDDAchannel(short *, int); /* PAD */ - - -// Lecture du port de la playstation, etat des boutons lu à cette endroit ! -// Distribution des manettes en fonction du port. Si 2, une sur chacun des ports. -// Si supérieur a deux on en connecte 4 sur port 1 et le reste sur port 2 static long PADreadPort1(PadDataS *pad, int pad_index) { - pad->controllerType = in_type[pad_index]; - pad->buttonStatus = ~in_keystate[pad_index]; - //pad->buttonStatus = ~in_keystate; - if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON) { - pad->leftJoyX = in_analog_left[pad_index][0]; - pad->leftJoyY = in_analog_left[pad_index][1]; - pad->rightJoyX = in_analog_right[pad_index][0]; - pad->rightJoyY = in_analog_right[pad_index][1]; - } - return 0; + pad->controllerType = in_type[pad_index]; + pad->buttonStatus = ~in_keystate[pad_index]; + if (in_type[pad_index] == PSE_PAD_TYPE_ANALOGPAD || in_type[pad_index] == PSE_PAD_TYPE_NEGCON) { + pad->leftJoyX = in_analog_left[pad_index][0]; + pad->leftJoyY = in_analog_left[pad_index][1]; + pad->rightJoyX = in_analog_right[pad_index][0]; + pad->rightJoyY = in_analog_right[pad_index][1]; + } + return 0; } static long PADreadPort2(PadDataS *pad) { - pad->controllerType = in_type[4]; - pad->buttonStatus = ~in_keystate[4]; - //pad->buttonStatus = ~in_keystate >> 16; - if (in_type[4] == PSE_PAD_TYPE_ANALOGPAD || in_type[4] == PSE_PAD_TYPE_NEGCON) { - pad->leftJoyX = in_analog_left[4][0]; - pad->leftJoyY = in_analog_left[4][1]; - pad->rightJoyX = in_analog_right[4][0]; - pad->rightJoyY = in_analog_right[4][1]; - } - return 0; + pad->controllerType = in_type[4]; + pad->buttonStatus = ~in_keystate[4]; + if (in_type[4] == PSE_PAD_TYPE_ANALOGPAD || in_type[4] == PSE_PAD_TYPE_NEGCON) { + pad->leftJoyX = in_analog_left[4][0]; + pad->leftJoyY = in_analog_left[4][1]; + pad->rightJoyX = in_analog_right[4][0]; + pad->rightJoyY = in_analog_right[4][1]; + } + return 0; } /* GPU */ diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 89803ce5..ff3518ee 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -39,7 +39,6 @@ int in_type[8]; int in_analog_left[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }}; int in_analog_right[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 }}; -//int in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 }; int in_adev[2] = { -1, -1 }, in_adev_axis[2][2] = {{ 0, 1 }, { 0, 1 }}; int in_adev_is_nublike[2]; int in_keystate, in_state_gun; @@ -614,7 +613,6 @@ static void update_input(void) emu_set_action(emu_act); in_keystate[0] = actions[IN_BINDTYPE_PLAYER12]; - } #else /* MAEMO */ extern void update_input(void); diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index eb8d00f1..50fcf9e3 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -17,8 +17,6 @@ enum { DKEY_CROSS, DKEY_SQUARE, }; -//extern int in_type1, in_type2; -//extern int in_keystate, in_state_gun, in_a1[2], in_a2[2], in_a3[2], in_a4[2]; extern int in_state_gun; extern int in_type[8]; extern int in_analog_left[8][2]; diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 3f8a09cc..372fdd00 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -380,7 +380,6 @@ unsigned char multitappar[35] = { 0x00, 0x80, 0x5a, 0x41, 0x5a, 0xff, 0xff, 0xff static int bufcount, bufc; //PadDataS padd1, padd2; - unsigned char _PADstartPollPort1(PadDataS padd[4]) { int i=0; int decallage=2; @@ -447,9 +446,6 @@ unsigned char _PADstartPollPort1(PadDataS padd[4]) { return buf[bufc++]; } - - - unsigned char _PADstartPoll(PadDataS *pad) { bufc = 0; @@ -508,13 +504,9 @@ unsigned char _PADstartPoll(PadDataS *pad) { bufcount = 4; } - return buf[bufc++]; } - - - unsigned char _PADpoll(unsigned char value) { if (bufc > bufcount) return 0; return buf[bufc++]; @@ -599,7 +591,7 @@ static int LoadPAD1plugin(const char *PAD1dll) { unsigned char CALLBACK PAD2__startPoll(int pad) { PadDataS padd; - PAD2_readPort2(&padd); + PAD2_readPort2(&padd); return _PADstartPoll(&padd); } diff --git a/maemo/hildon.c b/maemo/hildon.c index 9b6f7877..6fbdcf57 100644 --- a/maemo/hildon.c +++ b/maemo/hildon.c @@ -484,31 +484,31 @@ inline void key_press_event(int key2,int type) switch (psxkey1){ case DKEY_CROSS: in_state_gun |= SACTION_GUN_A; - break; + break; case DKEY_CIRCLE: in_state_gun |= SACTION_GUN_B; - break; + break; case DKEY_TRIANGLE: in_state_gun |= SACTION_GUN_TRIGGER2; - break; + break; case DKEY_SQUARE: in_state_gun |= SACTION_GUN_TRIGGER; - break; + break; } }else if (type == 2) { switch (psxkey1){ case DKEY_CROSS: in_state_gun &= ~SACTION_GUN_A; - break; + break; case DKEY_CIRCLE: in_state_gun &= ~SACTION_GUN_B; - break; + break; case DKEY_TRIANGLE: in_state_gun &= ~SACTION_GUN_TRIGGER2; - break; + break; case DKEY_SQUARE: in_state_gun &= ~SACTION_GUN_TRIGGER; - break; + break; } } }else{ @@ -599,7 +599,7 @@ int maemo_init(int *argc, char ***argv) } fclose(pFile); } - + switch (in_type1){ case PSE_PAD_TYPE_GUNCON: memset(cornerActions, 0, sizeof(cornerActions)); @@ -610,7 +610,7 @@ int maemo_init(int *argc, char ***argv) break; case PSE_PAD_TYPE_ANALOGPAD: printf("Controller set to analog (SCPH-1150)\n"); - break; + break; } if (in_enable_vibration) @@ -664,7 +664,7 @@ int maemo_init(int *argc, char ***argv) if (bKeepDisplayOn){ if (pthread_create(&display_thread, NULL, displayThread, NULL)) - printf("Failed to create display thread.\n"); + printf("Failed to create display thread.\n"); } pl_rearmed_cbs.only_16bpp = 1; -- 2.39.5