Skip to content

Make widescreen modes exclusive and keep presentation nearest - #7

Merged
Zection6V merged 26 commits into
developfrom
agent/test-guest-wide-host-off
Aug 17, 2026
Merged

Make widescreen modes exclusive and keep presentation nearest#7
Zection6V merged 26 commits into
developfrom
agent/test-guest-wide-host-off

Conversation

@Zection6V

@Zection6V Zection6V commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

This branch keeps the two MPH widescreen implementations separately selectable in the launcher, but they are now mutually exclusive, and it also fixes the framebuffer blur found while validating HD Rendering / Supersampling.

Widescreen controls

The launcher exposes:

  • Adaptive Widescreen — the original ndsrecomp host-side 448px renderer/compositor/HUD anchoring path.
  • Game Aspect Ratio Patch — the melonPrimeDS/mphCodex-derived MPH guest-side 21:9 projection/culling patch.

Game Aspect Ratio Patch defaults OFF, so the normal widescreen baseline remains the original Recomp host path.

The launcher now behaves like a two-choice radio group:

Adaptive Widescreen Game Aspect Ratio Patch Result
OFF OFF Native 4:3 / 256x192
ON OFF Original ndsrecomp host widescreen only
OFF ON Guest projection/culling patch; native 256x192 top image stretched to 448x192 only at final presentation
ON ON Invalid; enabling either feature automatically switches the other one OFF

Mutual exclusion is enforced in three places:

  1. the launcher Mods enable callback immediately disables the other mode;
  2. legacy mods.ini files containing both true are normalized while loading;
  3. final runner command construction refuses to pass both widescreen mechanisms even if an invalid state is somehow introduced later.

Guest-side writes remain fail-closed: only an authoritative supported MPH executable checksum can enable the projection/culling patch. Header-only fallback does not authorize it.

Supersampling / bottom-screen blur fix

The pinned frontend historically selected SDL linear framebuffer scaling whenever Supersampling > 1 or AA > 0:

SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");

After the HD direct presenter landed, the top screen can bypass SDL and remain crisp through OpenGL while the bottom screen still goes through SDL RenderCopy, explaining the observed crisp top / blurry bottom case. Without direct top presentation, both screens can be blurred.

This branch now:

  • forces SDL_HINT_RENDER_SCALE_QUALITY to nearest with override priority;
  • explicitly sets native framebuffer textures to SDL_ScaleModeNearest;
  • explicitly sets supersample render targets to SDL_ScaleModeNearest;
  • CI rejects a reintroduced SDL linear framebuffer scale path;
  • CI verifies the current OpenGL direct-present textures and DS texture samplers remain GL_NEAREST.

The xBR-lv2 Texture upscaling option remains a separate explicit HD Rendering feature. It is not used for final framebuffer/window scaling.

Validation

The host-only / guest-only widescreen paths and nearest-only presentation behavior were visually tested with MPH before the mutual-exclusion policy was added.

Code validation at 50271f43a4d0be9fe4c02a87c278bec80f4a4a47:

  • MPH Multi-ROM Static Checks #153: SUCCESS
  • Build #66: SUCCESS
    • ROM-free release policy
    • Linux runner + AppImage
    • Windows runner
    • generic config smoke test
    • real launcher build/tests
    • Windows ZIP packaging

The latest head only adds documentation after that validated code state; its CI rerun is expected to be equivalent. PR remains draft until intentionally promoted.

@Zection6V Zection6V changed the title TEST: guest widescreen with host adaptive renderer disabled Separate host and game widescreen toggles and keep presentation nearest Aug 17, 2026
@Zection6V Zection6V changed the title Separate host and game widescreen toggles and keep presentation nearest Make widescreen modes exclusive and keep presentation nearest Aug 17, 2026
@Zection6V
Zection6V marked this pull request as ready for review August 17, 2026 11:23
@Zection6V
Zection6V merged commit de126c5 into develop Aug 17, 2026
4 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