mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Only do our careful resimulation with joypads
This commit is contained in:
parent
50de28b1a1
commit
984f763d75
@ -350,7 +350,7 @@ bool netplay_resolve_input(netplay_t *netplay, size_t sim_ptr, bool resim)
|
|||||||
if (!pstate)
|
if (!pstate)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (resim)
|
if (resim && (dtype == RETRO_DEVICE_JOYPAD || dtype == RETRO_DEVICE_ANALOG))
|
||||||
{
|
{
|
||||||
/* In resimulation mode, we only copy the buttons. The reason for this
|
/* In resimulation mode, we only copy the buttons. The reason for this
|
||||||
* is nonobvious:
|
* is nonobvious:
|
||||||
@ -367,21 +367,11 @@ bool netplay_resolve_input(netplay_t *netplay, size_t sim_ptr, bool resim)
|
|||||||
* which will seem to jerkily be pressed numerous times with those
|
* which will seem to jerkily be pressed numerous times with those
|
||||||
* wavefronts.
|
* wavefronts.
|
||||||
*/
|
*/
|
||||||
const uint32_t keep_joypad =
|
const uint32_t keep =
|
||||||
(1U<<RETRO_DEVICE_ID_JOYPAD_UP) |
|
(1U<<RETRO_DEVICE_ID_JOYPAD_UP) |
|
||||||
(1U<<RETRO_DEVICE_ID_JOYPAD_DOWN) |
|
(1U<<RETRO_DEVICE_ID_JOYPAD_DOWN) |
|
||||||
(1U<<RETRO_DEVICE_ID_JOYPAD_LEFT) |
|
(1U<<RETRO_DEVICE_ID_JOYPAD_LEFT) |
|
||||||
(1U<<RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
(1U<<RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||||
uint32_t keep;
|
|
||||||
switch (dtype)
|
|
||||||
{
|
|
||||||
case RETRO_DEVICE_JOYPAD:
|
|
||||||
case RETRO_DEVICE_ANALOG:
|
|
||||||
keep = keep_joypad;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
keep = 0;
|
|
||||||
}
|
|
||||||
simstate->data[0] &= keep;
|
simstate->data[0] &= keep;
|
||||||
simstate->data[0] |= pstate->data[0] & ~keep;
|
simstate->data[0] |= pstate->data[0] & ~keep;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user