mirror of
https://github.com/SirHumza/orbisRPC.git
synced 2026-10-14 21:01:24 +02:00
- tmdb_crypto: self-contained SHA1/HMAC, URL builder, response parse, all verified against hashlib and Sony's live service in unit tests - tmdb: plain-HTTP fetch with deadline plus 8-entry cache - detect: TMDB in both resolve paths; artwork URL plumbed through detect_last_art into presence assets (official Sony CDN, no uploads) - remove appdb byte-scan: boundary ambiguity returned wrong names, worse than raw IDs; also removes the multi-MB game-process read - discord/daemon: full-URL artwork wins, pack URL next, asset key last
18 lines
943 B
C
18 lines
943 B
C
/* detect.h - find current foreground game title + app cache dir. */
|
|
#ifndef DETECT_H
|
|
#define DETECT_H
|
|
#include <stddef.h>
|
|
/* Returns 0 and writes a display name when a foreground game is found.
|
|
* Returns -1 when no game is active or the arguments are invalid.
|
|
* out_path is optional and receives the per-title cache path when provided. */
|
|
int detect_current_game(char *out_name, size_t cap, char *out_path, size_t p_cap);
|
|
/* Returns 1 if a foreground user app is running, otherwise 0. */
|
|
int detect_foreground_active(void);
|
|
/* Resolve a display name for a KNOWN title id (plugin mode). */
|
|
int detect_name_for_title(const char *titleId, char *out_name, size_t cap);
|
|
/* Last resolved titleId (e.g. "CUSA00740") or NULL if none yet.
|
|
* Used as the Discord asset key so icons follow automatically. */
|
|
const char *detect_last_titleid(void);
|
|
/* Last resolved artwork URL (Sony CDN via TMDB, or empty). */
|
|
const char *detect_last_art(void);
|
|
#endif |