From a17538fc10c6dc15cf4585a10a59bc45f35654fa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Dec 2024 13:48:29 +0300 Subject: fixes #4811 (Steam: Add now playing game title support) --- protocols/Steam/src/main.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'protocols/Steam/src/main.cpp') diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp index fcb3b1b9d9..5be2f85902 100644 --- a/protocols/Steam/src/main.cpp +++ b/protocols/Steam/src/main.cpp @@ -169,14 +169,22 @@ void CMPlugin::InitSteamServices() serviceHandlers[NotificationReceived] = ServiceResponseHandler(&CSteamProto::OnGotNotification); } +///////////////////////////////////////////////////////////////////////////////////////// + +static IconItem iconList[] = { + { LPGEN("Protocol icon"), "main", IDI_STEAM }, + { LPGEN("Gaming icon"), "gaming", IDI_GAMING }, +}; + int CMPlugin::Load() { InitSteamServices(); + // icons + g_plugin.registerIcon("Protocols/" MODULE, iconList, MODULE); + // extra statuses - char iconName[100]; - mir_snprintf(iconName, "%s_%s", MODULE, "gaming"); - hExtraXStatus = ExtraIcon_RegisterIcolib("steam_game", LPGEN("Steam game"), iconName); + hExtraXStatus = ExtraIcon_RegisterIcolib("steam_game", LPGEN("Steam game"), g_plugin.getIconHandle(IDI_GAMING)); HookEvent(ME_SKIN_ICONSCHANGED, OnReloadIcons); -- cgit v1.2.3