(VITA) Final Fix for controls

This commit is contained in:
Francisco José García García 2016-08-08 17:10:52 +02:00
parent 351b3fe3f6
commit 8dde35f221
2 changed files with 6 additions and 8 deletions

View File

@ -796,11 +796,7 @@ static const bool input_descriptor_label_show = true;
static const bool input_descriptor_hide_unbound = false; static const bool input_descriptor_hide_unbound = false;
#if defined(PSP) || defined(VITA)
static const unsigned input_max_users = 1;
#else
static const unsigned input_max_users = 5; static const unsigned input_max_users = 5;
#endif
static const unsigned input_poll_type_behavior = 2; static const unsigned input_poll_type_behavior = 2;

View File

@ -130,9 +130,6 @@ static void psp_joypad_poll(void)
unsigned players_count = PSP_MAX_PADS; unsigned players_count = PSP_MAX_PADS;
#ifdef PSP #ifdef PSP
sceCtrlSetSamplingCycle(0); sceCtrlSetSamplingCycle(0);
#else
if(settings->input.max_users<PSP_MAX_PADS)
players_count = settings->input.max_users;
#endif #endif
sceCtrlSetSamplingMode(DEFAULT_SAMPLING_MODE); sceCtrlSetSamplingMode(DEFAULT_SAMPLING_MODE);
@ -152,11 +149,16 @@ static void psp_joypad_poll(void)
unsigned p = (player == 1) ? 2 : player; unsigned p = (player == 1) ? 2 : player;
int32_t ret = CtrlPeekBufferPositive(p, &state_tmp, 1); int32_t ret = CtrlPeekBufferPositive(p, &state_tmp, 1);
#if defined(SN_TARGET_PSP2) || defined(VITA)
if(ret<0){
continue;
}
#endif
#ifdef HAVE_KERNEL_PRX #ifdef HAVE_KERNEL_PRX
state_tmp.Buttons = (state_tmp.Buttons & 0x0000FFFF) state_tmp.Buttons = (state_tmp.Buttons & 0x0000FFFF)
| (read_system_buttons() & 0xFFFF0000); | (read_system_buttons() & 0xFFFF0000);
#endif #endif
(void)ret;
analog_state[i][0][0] = analog_state[i][0][1] = analog_state[i][0][0] = analog_state[i][0][1] =
analog_state[i][1][0] = analog_state[i][1][1] = 0; analog_state[i][1][0] = analog_state[i][1][1] = 0;