summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-12-25 13:48:29 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-12-25 13:48:29 +0300
commita17538fc10c6dc15cf4585a10a59bc45f35654fa (patch)
treee8866d73deb12f485ea79af48a48e0fe987e25ef /protocols/Steam/src/main.cpp
parentf6aad2c5d45cff731663694811273c69b9b5e59a (diff)
fixes #4811 (Steam: Add now playing game title support)
Diffstat (limited to 'protocols/Steam/src/main.cpp')
-rw-r--r--protocols/Steam/src/main.cpp14
1 files changed, 11 insertions, 3 deletions
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);