(VITA) Small fix

This commit is contained in:
Francisco José García García 2016-08-08 17:12:52 +02:00
parent 8dde35f221
commit d0f96ed535

View File

@ -149,6 +149,8 @@ static void psp_joypad_poll(void)
unsigned p = (player == 1) ? 2 : player;
int32_t ret = CtrlPeekBufferPositive(p, &state_tmp, 1);
pad_state[i] = 0;
#if defined(SN_TARGET_PSP2) || defined(VITA)
if(ret<0){
continue;
@ -162,7 +164,6 @@ static void psp_joypad_poll(void)
analog_state[i][0][0] = analog_state[i][0][1] =
analog_state[i][1][0] = analog_state[i][1][1] = 0;
pad_state[i] = 0;
pad_state[i] |= (STATE_BUTTON(state_tmp) & PSP_CTRL_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0;
pad_state[i] |= (STATE_BUTTON(state_tmp) & PSP_CTRL_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0;
pad_state[i] |= (STATE_BUTTON(state_tmp) & PSP_CTRL_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0;