mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Don't call input_remote_state unless pointer is non-NULL
This commit is contained in:
parent
69a3bf6a31
commit
d1664481c2
@ -398,7 +398,8 @@ int16_t input_state(unsigned port, unsigned device,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NETWORKGAMEPAD
|
#ifdef HAVE_NETWORKGAMEPAD
|
||||||
input_remote_state(&res, port, device, idx, id);
|
if (input_driver_remote)
|
||||||
|
input_remote_state(&res, port, device, idx, id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Don't allow turbo for D-pad. */
|
/* Don't allow turbo for D-pad. */
|
||||||
|
@ -192,11 +192,6 @@ void input_remote_state(
|
|||||||
unsigned idx,
|
unsigned idx,
|
||||||
unsigned id)
|
unsigned id)
|
||||||
{
|
{
|
||||||
input_remote_state_t *ol_state = input_remote_get_state_ptr();
|
|
||||||
|
|
||||||
if (!ol_state)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case RETRO_DEVICE_JOYPAD:
|
case RETRO_DEVICE_JOYPAD:
|
||||||
@ -206,6 +201,10 @@ void input_remote_state(
|
|||||||
case RETRO_DEVICE_ANALOG:
|
case RETRO_DEVICE_ANALOG:
|
||||||
{
|
{
|
||||||
unsigned base = 0;
|
unsigned base = 0;
|
||||||
|
input_remote_state_t *ol_state = input_remote_get_state_ptr();
|
||||||
|
|
||||||
|
if (!ol_state)
|
||||||
|
return;
|
||||||
|
|
||||||
if (idx == RETRO_DEVICE_INDEX_ANALOG_RIGHT)
|
if (idx == RETRO_DEVICE_INDEX_ANALOG_RIGHT)
|
||||||
base = 2;
|
base = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user