Fix rumble events causing hang because the received input events were not read properly.
This commit is contained in:
parent
4b658cd86b
commit
1f79f4ed12
1 changed files with 9 additions and 0 deletions
|
|
@ -716,6 +716,15 @@ inline void rumbleIterate(std::vector<effect_t> &effects, std::vector<pollfd_t>
|
|||
return;
|
||||
}
|
||||
|
||||
// Copy over the received events
|
||||
for (auto x = 0; x < polls_tmp.size(); ++x) {
|
||||
for (auto y = 0; y < polls.size(); ++y) {
|
||||
if (polls_tmp[x].fd == polls[y].el.fd) {
|
||||
polls[y].el.revents = polls_tmp[x].revents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x < polls.size(); ++x) {
|
||||
auto poll = std::begin(polls) + x;
|
||||
auto effect_it = std::begin(effects) + x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue