Skip to content

Conversation

HomerSp
Copy link
Contributor

@HomerSp HomerSp commented Mar 8, 2022

Description

This fixes an issue where, if a rumble event happened, the game (HITMAN 3 in my case) would freeze for around a minute or so. This happened because a previous fix (loki-47-6F-64/sunshine@1f7bdb1) copied the poll fds to a temporary vector that was used for the poll call, but the received events were never copied back to the original vector, causing it to freeze until a timeout because it expected to find a POLLIN event.
I tested this by playing HITMAN 3 and throwing a remote charge - before the fix it would freeze for a few minutes just after detonating it, but with the fix it works just fine.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the documentation blocks for new or existing components

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

Pull requests must be made to the nightly branch. Thanks.

@ReenigneArcher
Copy link
Member

You can edit the PR to change the branch to nightly

@HomerSp HomerSp changed the base branch from master to nightly March 8, 2022 23:45
@HomerSp
Copy link
Contributor Author

HomerSp commented Mar 8, 2022

Ah, sorry, I've updated it!

…to the old vector.

Decrement index for polls when erasing to make sure none of the events are skipped.
@TheElixZammuto
Copy link
Member

I can't test this (I don't have a Linux machine available), but both the code and rationale seems reasonable. LGTM

@ReenigneArcher ReenigneArcher merged commit e223ba5 into LizardByte:nightly Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rumble causes game Freeze
4 participants