hle: skip the title's Bink movies on request (LEONIDA_SKIP_BINK) #2898
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2898
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2898"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ubiquitarianism on GitHub · 2026-12-01 16:35 UTC · original
ProjectLeonida:feat/skip-bink→main· +403 −1 · 4 files · 1 commits · merged 2026-12-01 17:00 UTCItem:
D3D12-HLE-SKIP-BINK(claimed in #2570).LEONIDA_SKIP_BINK=1skips the movies that play once (logos, the intro);=allskips the looping ones too (menu backgrounds, which then stay dark). Unset, nothing changes and no import is bound anew.The title's Bink DLL still opens every movie. The exports a player loop calls on an open movie (
BinkWait,BinkDoFrame*,BinkNextFrame,BinkGoto,BinkShouldSkip,BinkClose) are bound to wrappers (d3d12/crates/leonida-hle/src/modules/bink.rs). They put a skipped movie on its last frame and keep it from reaching the DLL, so the title's own end-of-movie check closes it. The executable's imports and those of DLLs the title loads later go throughSkipMovies(run.rs). An export looked up withGetProcAddressis not wrapped.The technique comes from fxceless/victory-fork (pull request 613, by C-GDev), as carried by trustno1-coder/VIctory-NVIDIA and lobomfz/VIctory-xmem
0a4aadf(GPL-3.0). It is written anew for this loader.Tested
cargo test -p leonida-hle --lib bink: 2 tests pass. The wrapping test fails whenwrap_inreturns the DLL's address instead of the wrapper, which I checked by making that change and running it.cargo build --profile diag -p leonida --features diagnostics.LEONIDA_SKIP_BINK=1. The log shows all eight wrapped exports the executable imports fromBink2Scarlett.dllbound to the wrappers, and the title ran as before: 4.7 min from a save, 3 min from no save.LEONIDA_KEYS: the first movie (3840x2160, 450 frames, not looping) was skipped (Bink movie ... looping=false skip=true), and the title went on to its setup screen. Booting from a save, no movie is played before the start screen, so nothing is skipped there.117d0403e5to2d769e5f46