Skip to content

PR #10 split: native macOS backend (Metal/CoreAudio/GameController) — PENDING - #13

Closed
mstan wants to merge 3 commits into
mainfrom
pr10/macos-native
Closed

PR #10 split: native macOS backend (Metal/CoreAudio/GameController) — PENDING#13
mstan wants to merge 3 commits into
mainfrom
pr10/macos-native

Conversation

@mstan

@mstan mstan commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Part of the PR #10 breakup (navjack, "Add macOS/Linux support, true widescreen, and Steam Deck validation"). Original authorship preserved.

What this is

Native macOS backend from PR #10: Metal presentation, GameController.framework (Xbox/PlayStation/Switch pads), a Core Audio output AudioUnit, an Info.plist + .icns, and the CMake macOS glue. Also vendors NTSC-CRT (third_party/ntsc-crt) for the optional CRT display mode. Stacked on pr10/linux-ingame-ui + pr10/imgui-vendor-launcher (their commits appear here too, since none are in main).

Disposition: PENDING — wanted, needs work before merge

The native backend itself is desirable and cleanly separable — macos_backend.m/.h are pure system-framework + SDL (no ImGui), portable as-is. Before it can land:

  1. Untangle from the retired UI layer. The branch's ~264-line main.c diff wires the native backend together with the superseded in-tree ImGui menu (macos_ui.mm, linux_ui.*); that wiring must be rebased onto the current recomp-ui world.
  2. Drop the re-vendored trees. third_party/imgui (~65k lines) and third_party/ntsc-crt should not be re-imported here — recomp-ui owns ImGui; NTSC-CRT is a separate opt-in decision.
  3. Verify on a Mac (or CI). Metal/CoreAudio/GameController can't be validated on the Windows dev box.
  4. Review the default flip: this branch also changes the non-Apple default OutputMethod SDL→OpenGL — intentional? (faithful to the original PR, but worth a decision).

Prebuilt MegaManX.app and Steam Deck binaries are deliberately excluded.

Kept open for discussion + eventual rework as part of the PR #10 close-out. Base is main.

navjack and others added 3 commits July 16, 2026 17:17
Broken out of PR #10 (navjack). Vendors the Dear ImGui core (1.92.9 WIP,
core + SDL2/OpenGL3 backends only — demo/examples/docs not imported) under
third_party/imgui and replaces snesrecomp_target_launcher_ng() with a local
mmx_target_launcher_ng() that builds the engine's launcher C sources against
this repo's ImGui copy. The engine launcher bundles 1.91.9b; platform UI
backends added on top of this (Metal, SDL_Renderer2) need the newer API,
and linking both copies would create duplicate symbols.

Also sets CXX/C++17 on the CMake project, which the vendored backends need.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Broken out of PR #10 (navjack). Adds src/linux_ui.{cpp,h}: a Dear ImGui
overlay for the Linux/Steam Deck runtime with F1 toggle, widescreen
enable/active status, and save/load-state slot controls. Renders through
either the SDL_Renderer2 or OpenGL3 ImGui backend to match the active
output method; keyboard focus is captured while the menu is open.

Stacked on pr10/widescreen (MmxDisplay_* API) and the vendored ImGui
commit (backends).

Note for review: F1 collides with the default LoadState slot-1 binding;
on Linux the menu toggle now wins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Broken out of PR #10 (navjack). Adds a native macOS runtime:

- src/macos_backend.{h,m}: Metal presenter (implements RendererFuncs incl.
  GetOutputSize), Core Audio output paced by the negotiated device format,
  GameController.framework gamepad polling with Steam Deck fallback
- src/macos_ui.mm: F1 ImGui menu (widescreen toggle, NTSC CRT display
  options, save/load states) via the vendored imgui_impl_metal backend
- third_party/ntsc-crt (crt_core/crt_snes + LICENSE/README only; test
  image zip and unrelated console variants not imported)
- config: Metal output method (Apple-only enum entry), Metal default on
  Apple; main.c APPLE paths replace SDL audio/gamecontroller init
- CMake: OBJCXX, Apple frameworks, MACOSX_BUNDLE packaging with
  resources/Info.plist + assets/MegaManX.icns

NOT imported from the PR: prebuilt MegaManX.app payload (binaries,
libSDL2 dylib) and the MegaManXSNESRecomp-steamdeck-x86_64 binary
payload — releases should never commit build artifacts.

Note for review: this commit also changes the non-Apple default
OutputMethod from SDL to OpenGL when config.ini has no explicit value
(faithful to the PR; flag if unwanted on Windows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mstan mstan closed this Jul 21, 2026
@mstan
mstan deleted the pr10/macos-native branch July 21, 2026 03:15
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.

2 participants