Skip to content

Input, outline, pairing and soundtrack fixes on the new layout; macOS context declarations - #2

Merged
Adubbz merged 10 commits into
TheMoonPeople:mainfrom
carrdylan52:native-presentation-input-audio
Oct 13, 2026
Merged

Adubbz merged 10 commits into
TheMoonPeople:mainfrom
carrdylan52:native-presentation-input-audio

Conversation

@carrdylan52

@carrdylan52 carrdylan52 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up fixes on top of the layout change in a393a0b, rebased so it applies cleanly to current main.

  • Input: keyboard-free look is composed without recursion (a mouse button bound to a movement half-axis could recurse forever), input latch timing resets between lifetimes, and the display-look epoch advances whenever motion is discarded so consumers never see it step backwards.
  • Rendering: outline composites replay over the full visible extent (tick rectangles plus padding cannot bound an interpolated rotation or a display-only camera turn), missing composite indices fall back safely, and interpolation pairing requires matching geometry so a new part sharing a material cannot take another part's pose. Upstream's filtered-outline regression is kept.
  • Audio: failed or missing soundtrack loads are remembered outside the PCM cache and never evict decoded music; evicted tracks are released before readiness is published.
  • Tests: shared device tests use a GfxGpu suite prefix so consumers can exclude them on GPU-less runners with one filter; a few slow device tests are trimmed or deduplicated to stay within hosted CI limits.
  • macOS: declares the cooperative context routines the macOS 26 SDK hides without _XOPEN_SOURCE.

Validation: Kazarov's own suite (135 cases) and Python tests pass; ChronicleTwo's Windows and Linux suites pass on this exact pin, and its dungeon, town and prologue captures (and eight display phases in town) are byte-identical to an upstream build on freshly published data.

For Chronicle when it updates its pin: classify GfxGpu* as GPU-dependent, and check moving immediate-mode meshes that do not opt into vertex blending, since pairing now requires matching geometry.

Also: the Rust data stage reuse no longer depends on directory order (the macOS rust test was failing on main and was flaky on Linux), Carbon is linked for winit on macOS, the host library is built with -ffp-contract=off like the game (arm64 fused a multiply-add in the logical-to-pixel mapping and landed a pixel off), and the mouse capture tests zero their SDL events.

Compose movement and look from independent device samples without recursive pad reads. Reset latch timing on initialization and shutdown, and advance the display epoch when motion is discarded so presentation does not replay stale input.

Cover simultaneous keyboard/controller look, mouse-bound movement, lifetime resets, released capture and discarded motion in shared keyboard regressions.
Use caller-provided visible presentation vertices and clear rectangles for model composites. Remove tick-bound region metadata because endpoint bounds do not prove coverage of interpolated rotations, skinning or display camera motion.

Require part geometry identity before resynchronizing matched surfaces. Retain upstream scratch-clear behavior and its filtered-outline regression alongside rotating-thin-part and geometry-replacement coverage.
…iness

Keep bounded failed-load keys outside the decoded PCM budget so missing tracks cannot evict playable audio. Release evicted decoded tracks before publishing request readiness, preserving deterministic cache lifetime observations.

Cover repeated missing loads, bounded negative-cache state, decoded-budget retention and readiness ordering.
…verage

Prefix suites that create a graphics device with GfxGpu so consumers can label and exclude them consistently. Include the upstream filtered-outline test in the same classification and describe shared pairing, lifetime and presentation regressions.
Use plain renderer options in CPU recording-reservation checks while retaining all state, capacity and lifetime assertions. Remove the standalone four-light draw duplicated by the indexed/immediate test with the same 50,60,30 oracle.
Define _XOPEN_SOURCE 700 before system headers in the cooperative thread translation unit on Apple, unless the build already supplied it. This exposes getcontext, makecontext and swapcontext in the macOS SDK without changing Windows or Linux preprocessing.
@carrdylan52
carrdylan52 force-pushed the native-presentation-input-audio branch from c629291 to e5dfd75 Compare October 13, 2026 16:11
@carrdylan52 carrdylan52 changed the title Native presentation, input, SDK and soundtrack support for ChronicleTwo Input, outline, pairing and soundtrack fixes on the new layout; macOS context declarations Oct 13, 2026
Directory iteration order is unspecified and differs on APFS, so a host could
pick a newer matching stage over the one it had just released. Sorting the
candidates keeps stage reuse deterministic on every platform.
winit's macOS keyboard handling calls the Text Input Source and keyboard
layout functions (TISCopyCurrentKeyboardLayoutInputSource,
TISGetInputSourceProperty, kTISPropertyUnicodeKeyLayoutData, LMGetKbdType),
which live in Carbon. Linking the static Rust archive from C++ needs the
framework listed explicitly, like the other system frameworks.
`SDL_Event event{}` only initialises the union's first member, so the key
fields the test then sets sit beside indeterminate bytes; with stack
pattern initialisation `key.repeat` reads as set and F12 never releases
capture. SDL_zero clears the whole event.
@Adubbz
Adubbz merged commit 9310c53 into TheMoonPeople:main Oct 13, 2026
6 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.

2 participants