XGameUi: a text entry's limit is the console's #370
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!370
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/370/head"
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?
@marquezinii on GitHub · 2026-11-24 02:42 UTC · original
marquezinii:fix/text-entry-length-limit→main· +62 −7 · 1 files · 1 commits · merged 2026-11-25 00:10 UTCXGameUiShowTextEntryAsyncignored the length rules the GDK documents formaxTextLength: "On console, the maximum number of characters is 1024. [...] If the value 0 is passed in, it will be treated as a maximum character length of 1024. Further, if the inputScope is XGameUiTextEntryInputScope::Password, the maximum length will always be 1024 and the maxTextLength value will be ignored."Here 0 meant no limit (the result kept whatever was typed, and
EM_LIMITTEXTwith 0 lifts the edit box's cap), limits above 1024 were kept, and the scope was not read, so a password entry was cut to the title's limit.The limit is now worked out once from the scope and the title's value, and used for both the dialog and the result.
Tested: a new test checks the rule itself and two calls through the object: a 2000-character default with limit 0 now gives 1025 bytes (it gave 2006 before), and a password entry with limit 8 keeps all 8 + 1 characters.
cargo test -p victory-hlepasses and clippy reports nothing new. The host dialog itself was not opened.https://learn.microsoft.com/gaming/gdk/docs/reference/system/xgameui/functions/xgameuishowtextentryasync
@jeremygold02 on GitHub · 2026-11-24 04:06 UTC · original
Thanks @marquezinii for this change. I tested head
936e5e51c91c7b380a4729aeaa2255824ce8085awith:Result: 1 passed, 0 failed (86 filtered out). The test covers the console limit rule for zero and over-1024 title limits, password scope, and the resulting object-call length. It does not open the host text-entry dialog.