Skip to content

feat(videoout): use sce_sys/icon0.png as the window icon - #1080

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
alfalfa-star:feat/videoout-window-icon
Oct 9, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
alfalfa-star:feat/videoout-window-icon

Conversation

@alfalfa-star

@alfalfa-star alfalfa-star commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What

The game window now uses the title's icon. When /app0/sce_sys/icon0.png exists, DisplayWindow decodes it with the existing decoder_png (RGBA8) and sets it with SDL_SetWindowIcon right after the window is created.

This completes the icon work:

The icon bytes come from the existing AppMetadata HasAppIcon/GetAppIconData, which already check the PNG signature. Without icon0.png nothing changes. If the icon can't be decoded, window creation throws, like the other DisplayWindow failures.

libSceVideoOut now links decoder_png. No new dependencies or flags.

Tested

Linux (Arch, KDE Plasma, Wayland session):

  • libSceVideoOut builds, and guest_video_out_wqhd_detection passes.
  • Standalone check with the same decode and SDL_SetWindowIcon path, a real 512×512 icon0.png and SDL_VIDEODRIVER=x11: _NET_WM_ICON is 512×512, and pixel (100,100) reads 0xffc91312 (ARGB), which matches the decoded RGBA c9 13 12 ff, so the channel order is correct.
  • PPSA14632 (LEGO Horizon Adventures), with this commit on a test tree of main plus other open PRs, SDL_VIDEODRIVER=x11 under XWayland: the game window's _NET_WM_ICON (read with XGetWindowProperty) is 512×512, and pixel (100,100) is 0xffc91312, the same as in the standalone check. (xprop prints 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

🤖 Generated with Claude Code

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>
@oneandonlydean

Copy link
Copy Markdown
Collaborator

The Tested section still has the hidden FILL IN after the game run line; please add the title run or remove it.

@alfalfa-star

Copy link
Copy Markdown
Contributor Author

Replaced the placeholder with the title run. On PPSA14632 under XWayland, the game window's _NET_WM_ICON is the 512×512 icon0.png, and a sampled pixel matches the decoded PNG. I read it with XGetWindowProperty, because xprop prints a property that large (about 1 MiB) as empty.

@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 57a529d5, merged onto main 8b393b6 in one build with 31 other PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#674 core/libs/prx/libSceVideoOut/CMakeLists.txt L19

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on Linux: builds and full ctest passes (548/548) merged onto current main; CI is green on the head (linux, windows, conventions). The RGBA8 output of Decoder::Png::Decode matches SDL_PIXELFORMAT_RGBA32, and the surface is freed. Windows build confirmed by @popcoder565. Merging.

@adriadam10
adriadam10 merged commit 64fe743 into boykopovar:main Oct 9, 2026
5 checks passed
@alfalfa-star
alfalfa-star deleted the feat/videoout-window-icon branch October 10, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants