Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only keep the ViGEmBus connection alive while gamepads are attached #1962

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jan 1, 2024

Description

This is a potential workaround for the BSODs reported in #1370. It seems that keeping a ViGEmBus handle alive across a power transition can cause ViGEmBus to crash, so we will just open it when we need it and close it when all gamepads are gone.

As a nice bonus, this allows Sunshine to pick up a new ViGEmBus installation without needing to restart Sunshine. It might also resolve the issue with the ViGEmBus installer rebooting the system (at least when it's just us holding a ViGEmBus handle).

Screenshot

Issues Fixed or Closed

Fixes #1370

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

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 in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher

This comment was marked as off-topic.

@cgutman

This comment was marked as off-topic.

@cgutman cgutman force-pushed the vigembus_connection branch from 853ede0 to 96c8c99 Compare January 3, 2024 01:13
@cgutman cgutman merged commit e7a3c48 into LizardByte:nightly Jan 3, 2024
42 checks passed
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.

Sunshine randomly crashes & restarts on specific hardware
2 participants