[Agent] feat: ScalingMode enum — Phase 1 of Screen Scaling standardization#3616
Conversation
|
🤖 PR created. AI review starting automatically. |
f8f2fcc to
87c902d
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
|
Agent completed feature flag implementation. New scalingModeRenderer flag (disabled by default) gates all renderer changes. Legacy scaling behavior is preserved until the flag is enabled. PR pushed. |
🔍 Self-Review CompleteReviewed all 10 changed files. Found and fixed 5 issues in commit Issues Fixed
No Issues Found
|
efbe73c to
5af8e7b
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
Self-Review ResultsFiles Reviewed
Issues Found & Fixed🔴 tvOS compilation error (FIXED) — #if os(tvOS)
.pickerStyle(.automatic)
#else
.pickerStyle(.navigationLink)
#endifIssues Checked (No Action Needed)
Pre-existing Issues (Out of Scope)
|
|
@claude does this work with all cores correctly? like are we just stretching the gl/metal buffers, do the cores actually know if they should internally do stretch/scale,widescreen etc? maybe that's another phase? |
🔬 Analysis: What Phase 1 Actually Does (and Doesn't Do)Great question — you're right to flag this. Here's the full picture: What Phase 1 IS doingPhase 1 operates exclusively at the display layer — it calculates how big the Metal/GL
The What Phase 1 is NOT doing
Summary
For any mode that changes AR, cores producing buffers with their own internal AR assumptions (PAR correction, widescreen hacks, etc.) will interact with Phase 1 at the texture-stretch level only. Confirmed: Phase 2/3 neededTo make
The So Phase 1 is correct as scoped — the enum and renderer layout changes are solid. The user-visible behavior for |
d490137 to
17ee1ff
Compare
|
@claude my concern with merging this now is i'm working on a new release and don't want to add more bugs or break current scaling can we do this in a way that is feature flagged so we can merge and do the next phases safely in parallel with releases? |
Feature Flag Added — Safe to MergeAdded a What changed
How the flag works
Toggle it in Settings > Advanced > Feature Flags > What this means for the release
|
05c6c02 to
f884d5c
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
|
Done: cached scalingModeRenderer feature flag as private lazy var in PVGLViewController and PVMetalViewController. 5 inline reads replaced with 1 lazy-init per class. |
f884d5c to
0210365
Compare
Self-Review Results — ScalingMode Phase 1Files Reviewed (13 changed files)
Fix AppliedDead code removed — Findings — No Further Changes Needed
|
|
@claude for any loops or rending code, we should cache the feature flag value, it's unlikely to change during emulation anyway, so an initial read is all we need |
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
|
Cached the |
f208f6c to
e1c6e2d
Compare
…ooleans Adds ScalingMode (aspectFit, aspectFill, stretch, integerScale, nativeResolution) as the unified video scaling setting for all native PVCore-based renderers. Both Metal and GL renderers now use scalingMode for layout, enabling the previously-missing stretch and aspectFill modes. Legacy booleans kept (deprecated) with automatic migration on first launch. Part of #2673 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tests, changelog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
NavigationLinkPickerStyle is unavailable on tvOS; use .automatic there. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ure flag Add scalingModeRenderer feature flag (disabled by default) so both PVMetalViewController and PVGLViewController fall back to the legacy nativeScaleEnabled/integerScaleEnabled boolean paths when the flag is off. New ScalingMode paths (Stretch, Aspect Fill, etc.) activate only when the flag is toggled on in Settings > Advanced > Feature Flags, allowing Phase 1 to merge safely in parallel with active releases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lers Replace repeated PVFeatureFlags.shared.isEnabled(.scalingModeRenderer) calls in render loops with a single lazy-initialized stored property. The flag is read once on first access and reused for the session lifetime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e1c6e2d to
1fe8515
Compare
|
@claude merged, start the next phase, update related tickets, do a new pr |
Phase 2 Complete - PR #3619 Open
|
Summary
Implements Phase 1 of the Screen Scaling & Aspect Ratio Standardization epic: a unified
ScalingModeenum that replaces the dualnativeScaleEnabled/integerScaleEnabledbooleans for all native PVCore-based rendering.Changes
ScalingModeenum (new,PVSettings) — 5 modes with full metadata for UI:.aspectFit— letterbox/pillarbox, preserves AR (existing default behavior).aspectFill— zoom to fill, preserves AR, may crop edges (new).stretch— fill ignoring AR (new).integerScale— integer multiples of native resolution (wasintegerScaleEnabled).nativeResolution— 1:1 pixel mapping (wasnativeScaleEnabled)PVMetalViewController— layout calculation now switches onscalingMode; Aspect Fill and Stretch modes fully implementedPVGLViewController— same layout refactor for the GL/OpenGL pathRenderSettings—nativeScaleEnabledbecomes a computed shim overscalingModeSettings UI — two boolean toggles replaced by a
PickerforScalingMode(navigation link style)Migration — automatic one-time migration from legacy booleans on first read of
scalingModeMupen64Plus + DeltaSkin — updated to use
scalingModecomparisonsBackwards Compatibility
Legacy keys
nativeScaleEnabledandintegerScaleEnabledare kept (deprecated) so existing code inPVSettingsViewControllerand any per-core code continues to compile. TheRenderSettings.nativeScaleEnabledcomputed property preserves all callsites inPVEmulatorViewController+DeltaSkinScreen.RetroArch / libretro Notes
Documented the libretro core-specific aspect ratio option keys in
ScalingMode.swiftinline docs for future Phase 2/3 work. The libretro API usesretro_game_geometry.aspect_ratio+RETRO_ENVIRONMENT_SET_GEOMETRY (37)for runtime updates — these already flow throughPVLibRetroCorecorrectly; per-core overrides (Mupen, Dolphin, PPSSPP, etc.) will be Phase 2.Test plan
Provenance-Litefor iOS Simulator — verifies Metal renderer compilesnativeScaleEnabled=truein UserDefaults, re-launch →scalingModeshould migrate to.nativeResolutionPart of #2673
🤖 Generated with Claude Code