Minor bugfixes in input resolution.

This commit is contained in:
Gregor Richards 2017-09-11 19:17:50 -04:00
parent 2794031d12
commit 6eaaaef995
2 changed files with 1 additions and 2 deletions

View File

@ -510,7 +510,7 @@ static int16_t netplay_input_state(netplay_t *netplay,
delta = &netplay->buffer[ptr];
istate = delta->resolved_input[port];
if (!istate)
if (!istate || !istate->used)
return 0;
curr_input_state = istate->data;

View File

@ -355,7 +355,6 @@ bool netplay_resolve_input(netplay_t *netplay, size_t sim_ptr, bool resim)
(1U<<RETRO_DEVICE_ID_JOYPAD_DOWN) |
(1U<<RETRO_DEVICE_ID_JOYPAD_LEFT) |
(1U<<RETRO_DEVICE_ID_JOYPAD_RIGHT);
uint32_t prev = simstate->data[0];
simstate->data[0] &= keep;
simstate->data[0] |= pstate->data[0] & ~keep;
}