mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 10:49:02 +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
|
||||
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
input_remote_state(&res, port, device, idx, id);
|
||||
if (input_driver_remote)
|
||||
input_remote_state(&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
/* Don't allow turbo for D-pad. */
|
||||
|
@ -192,11 +192,6 @@ void input_remote_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
input_remote_state_t *ol_state = input_remote_get_state_ptr();
|
||||
|
||||
if (!ol_state)
|
||||
return;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
@ -206,6 +201,10 @@ void input_remote_state(
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
{
|
||||
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)
|
||||
base = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user