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

Fatal warning improvements #1948

Merged
merged 3 commits into from
Dec 30, 2023
Merged

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Dec 30, 2023

Description

This PR has a few changes to improve the UX for "fatal" errors in the web UI.

  • It demotes FFmpeg's AV_LOG_FATAL log level down to our error level to avoid things like Provided device doesn't support required NVENC features #1849
  • It adds an error for ViGEmBus initialization failure since it's common for portable users to fail to install it and wonder why their gamepad doesn't work
  • Tweaked wording to be less strong regarding configuration errors, since some may be expected in esoteric configurations

Screenshot

image

Issues Fixed or Closed

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

Some "fatal" errors might be expected for some esoteric configurations.
While this is not technically fatal, it's almost certainly not what the user wants.
@@ -200,6 +200,8 @@ namespace platf {
if (!VIGEM_SUCCESS(status)) {
BOOST_LOG(warning) << "Couldn't setup connection to ViGEm for gamepad support ["sv << util::hex(status).to_string_view() << ']';

// Log a special fatal message for this case to show the error in the web UI
BOOST_LOG(fatal) << "ViGEmBus is not installed or running. You must install ViGEmBus for gamepad support!"sv;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I think the final vigembus version has been very finicky to install.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've seen issues with it too (especially with those unexpected reboots when upgrading ViGEmBus). I'm planning to put up another PR to avoid installing it if it's already present on the system to hopefully avoid these issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably throw up a warning too, that it's known to unexpectedly reboot during install.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason it's rebooting is that the driver is already installed and in use, so I think it should never reboot if we don't upgrade existing versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Can we detect the installed version and put up a warning in the UI if it's not the latest?

We can get latest release info from https://api.github.com/repos/nefarius/ViGEmBus/releases/latest using the tag_name key for comparison.

@cgutman cgutman merged commit 11d4723 into LizardByte:nightly Dec 30, 2023
40 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.

2 participants