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

feat(display): Configure display device based on user config #3441

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

FrogTheFrog
Copy link
Collaborator

@FrogTheFrog FrogTheFrog commented Dec 11, 2024

Description

This is a part 2 of #2894.

This PR adds support for configuring display via the display device library from the previous commit.
This is completely optional feature, which can be disabled with a single config switch.

This includes:

  • Changing display modes based on what the client requests or hardcoding some values.
  • Toggling HDR state.
  • Activating/deactivating displays.
  • Persistently restoring original settings in case Sunshine crashes or something similar happens.

The changes are best understood from screenshots below.

Screenshot

New advanced settings panel:
image

Device config options:
image

Resolution drop-down 1:
image

Resolution drop-down 2:
image

Refresh rate drop-down 1:
image

Refresh rate drop-down 2:
image

HDR drop-down:
image

The "hard reset" option in case the previous display config can no longer be restored (display no longer available/firmware was updated so the device id has changed/etc.):
image

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

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 39.42652% with 169 lines in your changes missing coverage. Please review.

Project coverage is 8.44%. Comparing base (df0bc3f) to head (0112fa9).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/display_device.cpp 50.93% 85 Missing and 20 partials ⚠️
src/config.cpp 0.00% 29 Missing ⚠️
src/nvhttp.cpp 0.00% 15 Missing ⚠️
src/confighttp.cpp 0.00% 11 Missing ⚠️
src/platform/windows/audio.cpp 0.00% 4 Missing ⚠️
src/platform/linux/audio.cpp 0.00% 3 Missing ⚠️
src/process.cpp 0.00% 1 Missing ⚠️
src/stream.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3441      +/-   ##
=========================================
+ Coverage    7.87%   8.44%   +0.57%     
=========================================
  Files          90      90              
  Lines       15803   16069     +266     
  Branches     7487    7633     +146     
=========================================
+ Hits         1244    1357     +113     
- Misses      14080   14214     +134     
- Partials      479     498      +19     
Flag Coverage Δ
Linux 9.15% <39.25%> (+0.73%) ⬆️
Windows 6.18% <39.63%> (+0.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/audio.h 100.00% <100.00%> (ø)
src/config.h 0.00% <ø> (ø)
src/platform/common.h 22.89% <ø> (ø)
src/process.cpp 1.09% <0.00%> (-0.01%) ⬇️
src/stream.cpp 2.50% <0.00%> (-0.01%) ⬇️
src/platform/linux/audio.cpp 11.06% <0.00%> (-0.15%) ⬇️
src/platform/windows/audio.cpp 25.90% <0.00%> (-0.20%) ⬇️
src/confighttp.cpp 0.00% <0.00%> (ø)
src/nvhttp.cpp 0.00% <0.00%> (ø)
src/config.cpp 0.00% <0.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

This is a first pass review for which I only looked at the html/vue, and docs.

src_assets/common/assets/web/public/assets/locale/en.json Outdated Show resolved Hide resolved
src_assets/common/assets/web/public/assets/locale/en.json Outdated Show resolved Hide resolved
src_assets/common/assets/web/public/assets/locale/en.json Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
@ReenigneArcher ReenigneArcher added this to the stable release milestone Dec 25, 2024
@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@RebelliousX

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@moi952

This comment was marked as off-topic.

@FrogTheFrog

This comment was marked as outdated.

@moi952

This comment was marked as outdated.

@FrogTheFrog

This comment was marked as outdated.

@moi952

This comment was marked as off-topic.

@FrogTheFrog
Copy link
Collaborator Author

AHHHH! If I disable the new feature, I still have the problem. Should I create an issue? :p

Yes, since it's unrelated to this PR then.

Before reporting the problem I installed the latest version of this thread, and I just saw that I no longer have the "mapping" of resolutions and framerate, is it not in this PR anymore?

It will not come with this PR, but with a later one. I will still keep the fork updated from time to time FYI.

Copy link

sonarqubecloud bot commented Jan 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
4 New issues
4 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ReenigneArcher ReenigneArcher merged commit 76bea8a into LizardByte:master Jan 8, 2025
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants