Files
psxrecomp/runtime/include/psx_window_icon.h
T
Alex Vanderveen c481b6cd4e runtime: expose the resolved window-icon path for the launcher
recomp-ui takes a host-supplied icon path (GameInfo.window_icon_path) so the
launcher window carries the same art as the game window. Publish the path
psx_apply_window_icon() already resolves, rather than letting the launcher
repeat the search — repeating it is what would let the two drift apart the
next time the candidate list changes.

Resolved once and cached: both the game window and the launcher ask, and the
answer cannot change within a run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194TYJAqgyG9a9PJe9uUcgQ
2026-08-29 11:04:30 -04:00

24 lines
823 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
struct SDL_Window;
/* Load assets/psxrecomp.png beside the exe (or SDL base path) and apply as
* the window / taskbar icon. No-op when the PNG is missing. */
void psx_apply_window_icon(struct SDL_Window *window, const char *argv0);
/* The resolved path psx_apply_window_icon() would use, or "" when no icon PNG
* was found. Exists so the launcher can carry the SAME icon as the game
* window: recomp-ui takes a host-supplied path (GameInfo.window_icon_path)
* rather than repeating this search, which is what stops the two from
* drifting apart the next time the search order changes. The result is cached
* on first call and the returned pointer stays valid for the process. */
const char *psx_window_icon_path(const char *argv0);
#ifdef __cplusplus
}
#endif