mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 18:58:21 +00:00
input remote: Add analog device parsing
This commit is contained in:
parent
a778d878ff
commit
2a2b18b507
@ -171,6 +171,9 @@ static void input_remote_parse_packet(struct message *msg, unsigned user)
|
||||
if (msg->state)
|
||||
ol_state->buttons[user] |= 1 << msg->id;
|
||||
break;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
ol_state->analog[msg->index * 2 + msg->id][user] = msg->state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -246,7 +249,13 @@ void input_remote_poll(input_remote_t *handle)
|
||||
input_remote_parse_packet(&msg, user);
|
||||
else if ((ret != -1) || (errno != EAGAIN))
|
||||
#endif
|
||||
{
|
||||
ol_state->buttons[user] = 0;
|
||||
ol_state->analog[0][user] = 0;
|
||||
ol_state->analog[1][user] = 0;
|
||||
ol_state->analog[2][user] = 0;
|
||||
ol_state->analog[3][user] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user