hle: skip the title's Bink movies on request (LEONIDA_SKIP_BINK) #2898
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ubiquitarianism/leonida. Originally posted by ubiquitarianism on 2026-12-01T16:35:39Z.
Item:
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.