Repository navigation
Conversation
# Conflicts: # src/mods/Loader.lua
# Conflicts: # docs/modding.md # src/mods/Loader.lua # src/world/WorldAPI.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mods ported from Gen1Recomp currently have no public way to request logical input on Gen2Recomped. Add
mod.input:tap(game, button),mod.input:press(game, button)andmod.input:release(token)with the shared eight-button GB contract, for native API 1/2, unified API 2 and API 3.Depends on #142 and its public-API prerequisites. Merge those first and rebase before merging. The new work is isolated in one commit: implementation-only diff. It does not require the rendering or shader PRs.
A tap queues an edge for the next fixed step without retaining its own held source. Press returns an opaque token; only its owning mod can release it, once. Separate tokens preserve keyboard, gamepad, overlay and other mod holds, and logical buttons ignore keyboard rebinding. The existing fixed-step Input loop is unchanged; these calls bypass raw input hooks and engine hotkeys.
Per-loader ownership handles rollback, reload, launcher teardown and every native Input reset. Reset retires tokens only for the affected Input instance while allowing new input afterward. Retired handles cannot issue new presses. Session-specific sources prevent old tokens from releasing replacement-session holds; outstanding holds remain available for teardown even if their caller loses its token/loader references. Reading the facade requires no Game/Input construction or graphics.
Includes general portability documentation, a shared example and a dedicated ROM-free workflow pinned to unmodified Gen1Recomp
79ea62f45fb2ea8f65d081a109431e4eb1bbdb36.Validation:
Integration retains the existing world-action cancellation and viewport cleanup when combining the three Loader lifecycle insertion points. Already queued edges retain the normal Input semantics after release/owner cleanup; Input reset clears them. ROM-dependent tiers were skipped without imported data. These are headless contract/routing checks, with no physical-controller or OS-event-delivery claim.
Hosted workflows currently require maintainer approval (
action_required): portable logical mod input contract, API 3 contracts, portable input hook contract, ci. No hosted pass is claimed.