Repository navigation
feat(videoout): use sce_sys/icon0.png as the window icon - #1080
Conversation
The display window now takes its icon from /app0/sce_sys/icon0.png when the game has one, decoded with the existing PNG decoder and set through SDL_SetWindowIcon. Linux executables have no icon resource, so the window, taskbar and alt-tab showed a generic icon; on Windows the embedded resource from boykopovar#350 already covers this and the call only reinforces it. Without icon0.png nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The Tested section still has the hidden |
|
Replaced the placeholder with the title run. On PPSA14632 under XWayland, the game window's |
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
|
Checked on Linux: builds and full ctest passes (548/548) merged onto current |
What
The game window now uses the title's icon. When
/app0/sce_sys/icon0.pngexists,DisplayWindowdecodes it with the existingdecoder_png(RGBA8) and sets it withSDL_SetWindowIconright after the window is created.This completes the icon work:
icon0.pngin the generated Windows.exe. Explorer shows it, and SDL uses it as the window class icon..desktopentry, so Linux file managers and launchers show the icon.The icon bytes come from the existing AppMetadata
HasAppIcon/GetAppIconData, which already check the PNG signature. Withouticon0.pngnothing changes. If the icon can't be decoded, window creation throws, like the otherDisplayWindowfailures.libSceVideoOutnow linksdecoder_png. No new dependencies or flags.Tested
Linux (Arch, KDE Plasma, Wayland session):
libSceVideoOutbuilds, andguest_video_out_wqhd_detectionpasses.SDL_SetWindowIconpath, a real 512×512icon0.pngandSDL_VIDEODRIVER=x11:_NET_WM_ICONis 512×512, and pixel (100,100) reads0xffc91312(ARGB), which matches the decoded RGBAc9 13 12 ff, so the channel order is correct.mainplus other open PRs,SDL_VIDEODRIVER=x11under XWayland: the game window's_NET_WM_ICON(read withXGetWindowProperty) is 512×512, and pixel (100,100) is0xffc91312, the same as in the standalone check. (xpropprints the property as empty because it is about 1 MiB.)Not tested: native Wayland (shows only where the compositor supports
xdg-toplevel-icon-v1) and Windows.No automated test: it needs a real window and display, which CI doesn't have.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code