Skip to content

Ensure Switch controller paradigm exists and recover Mac controllers after sleep - #87

Open
actuallyitsnathaniel wants to merge 2 commits into
ThatGuyMcd:mainfrom
actuallyitsnathaniel:controller-map-etiquette-and-mac-wake
Open

actuallyitsnathaniel wants to merge 2 commits into
ThatGuyMcd:mainfrom
actuallyitsnathaniel:controller-map-etiquette-and-mac-wake

Conversation

@actuallyitsnathaniel

Copy link
Copy Markdown
Contributor

What

  • Switch Pro / Joy-Con defaults now follow the controller face etiquette: printed A/B/X/Y match the binding tokens. SDL2 pins SDL_GAMECONTROLLER_USE_BUTTON_LABELS=1; SDL3's position-mode reports are remapped in the SDL3 input host before bindings see them. NSO N64 / GameCube pads stay on their existing label-oriented paths.

  • Also fixes dead input after closing a MacBook lid while paused: on wake we treat a frontmost app as input-capable when SDL's focus bit is stale, and force-reopen controller handles so pads come back in the same session without unplugging.

this is a non-issue. unplugging and re-plugging in a controller fixes this already.

Pattern checklist

  • First-party changes are in-place edits under runtime-recomp/, modding/ or scripts/ (no new patches/<name>/)
  • Third-party changes are *.patch files registered in patches/manifest.json (n/a)
  • Guest hooks only via guest-hooks/hooks.toml; symbols only via symbols/*.toml (n/a)
  • New settings, launcher pages and owned services are registered, and their contract docs are updated (n/a;
    docs/CONTROLLERS.md note only)
  • netplay/legacy_identity.hpp updated (reviewed by both owners) if simulation, wire or owned-service behaviour changed
    (n/a)
  • Tests added or updated; python scripts/check.py --suite guard passes locally (DKRControllerFaceEtiquette added)
  • Platforms considered: built/ran on macOS; Switch etiquette also applies wherever SDL2/SDL3 input runs. Windows / Linux
    / iOS / Android not rebuilt for this PR.

Risk

Low. Etiquette remap is limited to Switch Pro / Joy-Con families; Xbox/PS and NSO N64/GC are unchanged. Mac wake recovery only force-reopens pads and relaxes the focus gate while NSApp is active, so backgrounded windows still drop gameplay input. Capsule base_sha256 pins updated for the touched first-party files. Revert the commit to roll back.

    controller paradigm exists and recover Mac controllers after sleep
@actuallyitsnathaniel

Copy link
Copy Markdown
Contributor Author

reviewing failed checks rn

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