Prompts: PlayStation symbols with VICTORY_PROMPTS=playstation, drawn in memory like the key caps #2798
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2798
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2798"
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?
@DoubleD17 on GitHub · 2026-11-29 17:27 UTC · original
DoubleD17:feat/playstation-prompts-in-memory→main· +1562 −55 · 8 files · 13 commits · openNo issue asks for this. It is the smaller follow-up that the closing comment on #937 invited.
What it changes
The Xbox build of the title has Xbox button pictures only, so a player on a DualSense is asked for A, B, X and Y. With F1's CONTROLS set to DUALSENSE (NATIVE), or
VICTORY_PROMPTS=playstation, the prompts show a PlayStation pad's buttons: cross, circle, square and triangle, L1/R1/L2/R2 tags, L3/R3 for the stick clicks, the touchpad for View, the Options button for Menu, and a D-pad of four arrows. They are drawn in the colours of the title's own pictures.It works the same way as the keyboard key caps already on
main, and has the same footprint: no new dependency, no binary asset, and no change to the title's files.prompts::hookalready redraws the icon movie in memory when the streaming store hands it over. This PR adds a second style of redraw.victory_game::prompts::Style(KeyCaps,PlayStation).hook::installtakes the style andredrawndraws in it. The log saysprompts: PlayStation symbols drawn into the icon movie.prompts::playstation(new) uses the same recognition as the key caps.read_iconsis split out ofkey_capswith no change in behaviour. Everything is drawn in code from lines and arcs, into the shapes each icon already has: the hook can redraw a shape, give it a colour and empty it, but not add one.gfx::Movie::shape_lookreads a shape's bounds and its first solid fill colour, so the new shapes keep the title's colour and place.run.rs: on top of3222c1eb(prompts follow the F1 settings), the keyboard settings still come first and give key caps. Then CONTROLS DUALSENSE, orVICTORY_PROMPTS=playstation(for a PlayStation pad read through a remapper), places the hook in the PlayStation style. Anything else keeps the Xbox pictures.playstation_selected_byhas a test besidekeyboard_selected_by's.show_keys_in_promptsbecomesredraw_prompts(…, style), and theVICTORY_MNK_BINDINGScheck still applies to key caps only.docs/playstation-prompts.mdand one README line.Known differences from a PlayStation pad's own prompts:
VICTORY_PROMPTSis already one of the variablesplay.rskeeps, sosetx VICTORY_PROMPTS playstationsurvivesvictory play.How it was tested
VICTORY_PROMPTS=playstation(before the rebase on3222c1eb, which only changes which settings pick the style) we ran a test and checked the title screen footer, the pause footer and the Settings controls page (On Foot, Default scheme, plain and hold prompts). Icon by icon, they were compared with the title's own PlayStation 5 controls page. The face symbols, the touchpad, the L1/R1/L2/R2 tags (the Settings top bar included), the L3/R3 discs, the D-pad and the Options button match. No screenshots of the title are in this PR.4752c1ee): we ran a test in both modes,VICTORY_PROMPTS=playstationwith CONTROLS AUTO and CONTROLS DUALSENSE alone. Each logged the PlayStation symbols drawn into the icon movie and the title loading it. The title footer showed the PlayStation buttons in both modes, and the pause footer did too withVICTORY_PROMPTS=playstation(with CONTROLS DUALSENSE the keyboard doesn't reach the title, so the pause menu wasn't opened). The R2 fix wasn't seen on the Settings controls page in this run; unit tests cover it.cargo testpassed for the crates it touches: yes.cargo build --release --locked -p victoryf889bb07). The build compared on screen wasb1911184, before the R2 fix and the rebase.cargo test --locked -p victory-gameprompts::playstation)cargo test --locked -p victorycargo test --locked -p victory-formatsgfxtest passes; the 3bcpack::oracle_parity_*tests fail onmaintoo (bcpack.rsis not touched)--all-features, onvictory,victory-gameandvictory-formats-D warningsstops invictory-loaderandvictory-shaderonmaintoo.cargo xtask policyvictory-loader/src/heap_sites/frame_users.rs) is onmaintooThe tests build icon movies of their own, shaped like the title's: a frame, a shape and the letter for each icon, with two letter shapes for the triggers. They check that:
Checked for overlap
3222c1eb, and this PR is rebased on it. #462 reads more pads over HID and doesn't touch the prompts.VICTORY_PROMPTS=dualsense, words on the key-cap white cap, the title's own D-pad and stick pictures kept). This one also follows the original layout's shapes: shoulder tags, the Options pill, the four-piece D-pad and L3/R3 discs, measured against the title's own PlayStation 5 controls page.Credits
#937 (abilliontokens, after anoyarou's work in Marvisak/VIctory#3399) found how the icon sprites are drawn: a frame and then the letter shapes, with the triggers' letters as two shapes. This PR relies on that finding. No code, path data or art comes from either PR. The symbols are drawn here, and the lettering comes from the host's own font. PlayStation and DualSense are trademarks of Sony Interactive Entertainment.
AI Assisted
2bbb94558fto4752c1ee64@DoubleD17 on GitHub · 2026-11-30 22:00 UTC · original
Updated to current main (
e1251c31) with a merge, so the branch is mergeable again.apps/victory/src/run.rs. Main now skips the key pictures with!uses_stock_key_prompts()(97a53b19). This PR keeps that check for the keyboard style only, so DUALSENSE andVICTORY_PROMPTS=playstationstill get PlayStation buttons in controller mode:if style == Style::KeyCaps && !victory_hle::modules::gameinput::uses_stock_key_prompts()cargo test --workspace --locked: everything this PR touches passes.list::thin::tests::bindings_record_no_workandshader_cache::tests::every_switch_of_the_translator_is_in_the_key.cargo clippy --workspace --all-targets --locked -- -D warningsalso stops on main's own code, in files this PR doesn't touch:crates/victory-gpu/src/host.rs:5092(rangednever used)crates/victory-gpu/src/shadow.rs:7197(manualis_multiple_of)crates/victory-shader/src/emit/lower.rs:114(loop_capsnever read)AI Assisted
42e93b685etoc409d4862fView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.