Skip to content

fix: a TV at 59 Hz is in the 60 Hz mode asked for - #212

Merged
lippdev merged 2 commits into
mainfrom
fix/refresh-rate-ntsc-match
Nov 17, 2026
Merged

lippdev merged 2 commits into
mainfrom
fix/refresh-rate-ntsc-match

Conversation

@lippdev

@lippdev lippdev commented Nov 16, 2026

Copy link
Copy Markdown
Owner

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. IsCurrentMode wanted exactly 60, so ApplyFocusMode re-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 by IsCurrentMode and by the per-game profile. What is asked for doesn't change; only the "did it take?" check.
  • The log now says where the screen ended up: Telas: \\.\DISPLAY1 em 2560x1440@59 (pedido 2560x1440@60), or the failure with (ficou em …).
  • The session menu's resolution list still marks the exact current mode (it lists @59 and @60 separately).

Testing

  • dotnet test: 688 passing (11 new cases). Debug build OK.
  • On the TV: pending, the owner tests at home (checklist in docs/TESTING.md). Not to be merged before that.

🤖 Generated with Claude Code

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>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ 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.

Pullfrog  | View workflow run | Using gpt-6-luna | 𝕏

# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.md
#	docs/TESTING.md
@lippdev
lippdev merged commit dd0c77f into main Nov 17, 2026
5 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.

1 participant