Repository navigation
fix: a TV at 59 Hz is in the 60 Hz mode asked for - #212
Merged
Merged
Conversation
Asked for 2560x1440@60, the owner's LG TV (through NVIDIA) ends up at @59, the 59.94 Hz "60" of TVs that it lists next to @60. The check wanted exactly 60, so every session re-applied the mode twice (the TV going blank each time) and logged "Não foi possível aplicar"; a per-game profile saved at @60 re-applied it too. DisplayModeMatch.IsSame allows 1 Hz either way; the log now says which mode the screen is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This review covers the refresh-rate equivalence check, its use in session and per-game mode verification, the resulting-mode log, and the added unit tests and manual TV checklist.
- Refresh-rate matching: Same-size modes within 1 Hz are considered equivalent, preventing repeated mode applications for common fractional TV refresh rates.
- Mode reporting: Session mode application logs the actual resulting mode on success or failure.
- Coverage and validation: Pure-logic tests and a manual real-TV checklist are added; the PR description notes the real-TV checks are still pending.
gpt-6-luna | 𝕏
# Conflicts: # CHANGELOG.en-US.md # CHANGELOG.md # docs/TESTING.md
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
The owner's TV never seemed to take 2560x1440@60: every session logged
Não foi possível aplicar 2560x1440@60.Reproduced on the owner's PC (debug build, real session, the TV's mode read from Windows DPI-aware while the session ran): the TV is at 2560x1440, at @59. NVIDIA lists both @60 and @59 (59.94 Hz) for it and lands on @59 when asked for @60.
IsCurrentModewanted exactly 60, soApplyFocusModere-applied the mode twice more (~6 s, the TV blanking each time) and logged a failure that wasn't one. A per-game profile saved at @60 had the same exact check and would re-apply on every game start.DisplayModeMatch.IsSame(pure, tested): same size and a refresh within 1 Hz (59/60, 23/24, 29/30, 119/120, 143/144), 0 = any. Used byIsCurrentModeand by the per-game profile. What is asked for doesn't change; only the "did it take?" check.Telas: \\.\DISPLAY1 em 2560x1440@59 (pedido 2560x1440@60), or the failure with(ficou em …).Testing
dotnet test: 688 passing (11 new cases). Debug build OK.docs/TESTING.md). Not to be merged before that.🤖 Generated with Claude Code