Window and taskbar icon from the user's own game install (VICTORY_ICON, on by default) #1787
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!1787
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1787"
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?
@Jesper-Andersson on GitHub · 2026-11-29 00:05 UTC · original
Jesper-Andersson:pr/window-icon→main· +423 −3 · 5 files · 1 commits · merged 2026-11-29 08:16 UTCTested in game: the icon shows in the title bar and the taskbar button (checked by eye on 2026-11-29, Windows 11 dark theme, RTX 2070 SUPER). The log line for that run:
icon set big=32 small=16 dpi=96. The install's smallest logo is 44x44, so the 32 px and 16 px icons are scaled down from it; the install has no smaller artwork. This ran on our branch, which has the same commits merged onto our own base, not on this PR branch itself.On by default.
VICTORY_ICON=0turns it off.Relates to: no issue; this PR is my claim for the idea.
What it changes
The game window and its taskbar button showed the generic application icon. This sets them from the logos that the installed title's own
MicrosoftGame.configlists.Behaviour change: on by default.
VICTORY_ICON=0turns it off and leaves the window as it was.crates/victory-hle/src/modules/icon.rs) readsMicrosoftGame.confignext to the title's executable. It takes theShellVisualslogo attributesSquare44x44Logo,Square150x150LogoandSquare480x480Logo, orStoreLogoonly when none of those is there..., and links that lead out of the game folder are all refused.GetSystemMetricsForDpi(SM_CXICON / SM_CXSMICON)at the window's DPI. It is built withCreateIconIndirectand posted asWM_SETICON(ICON_BIG,ICON_SMALL). The icons are kept for the life of the process.WM_SETICONfrom the title is let through and logged at debug level.VICTORY_ICON: unset orgameuses the title's logo,0is off, and a.icoor.pngpath uses that file instead. Any failure is logged once and leaves the window as it is.windowsbecomes a normal dependency of victory-hle (it was optional, diagnostics only), withWin32_FoundationandWin32_Graphics_Imagingadded.windows-sysgainsWin32_UI_HiDpi. No new crate.docs/findings.md.Asset policy. The code holds only the attribute names from Microsoft's public
MicrosoftGame.configschema (ShellVisuals,Square44x44Logoand so on). The image file names and the images themselves are read at run time from the user's own installation. Nothing from the game is committed: no images, file names, strings or fixtures. Nothing is written to disk either; the icons live only in memory.Sources (Microsoft Learn): WM_SETICON, CreateIconIndirect, the Windows Imaging Component decoding overview and IWICBitmapScaler, GetSystemMetricsForDpi, GetDpiForWindow, and the MicrosoftGame.config ShellVisuals schema.
How it was tested
icon set big=32 small=16 dpi=96(96 dpi is 100 % scaling). The icons are scaled down from the 44x44 logo. Seen on our branch (the same commits merged onto our base), not on this PR branch. Not checked: Alt+Tab, and DPI scaling other than 100 %.cargo testpassed for the crates it touches: yes: 203 passed, 0 failed, 3 ignored, plusno_dll_planting1 passed (-p victory-hle; the unit tests are synthetic and cover the manifest parsing and the path checks).cargo clippy -p victory-hle --all-targets: no warnings in victory-hle (the warnings that remain are main's own, in victory-shader and victory-gpu, so-D warningsstops there before reaching this crate).cargo xtask policy: fails only on upstream's owncrates/victory-shader/src/emit/lower.rs(667,523 bytes, over the 655,360-byte limit; the same on main, see #1429/#1493/#1527). This PR does not touch that file, and every changed file passes.Checked for overlap
lifecycle.rs). Related: none sets the window icon. #982 (graphical launcher) has its own launcher icon drawn by itsbuild.rs; that is a separate program, not the game window. #1002, #1009, #1067 and #753 also change the window procedure inlifecycle.rs. This PR adds two lines there (icon::startinhook, and a debug log on the title'sWM_SETICON), so a rebase on any of them should be trivial. Companion PR (separate, independent, touches the same two spots inlifecycle.rs): the dark title bar,pr/dark-title.This was written with AI assistance (Claude Code).