From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- protocols/Steam/src/main.cpp | 19 ++++++++++++------- protocols/Steam/src/steam_proto.h | 6 +----- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp index cbe75d5100..1b7be830aa 100644 --- a/protocols/Steam/src/main.cpp +++ b/protocols/Steam/src/main.cpp @@ -1,10 +1,13 @@ #include "stdafx.h" +CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); HANDLE hExtraXStatus; -PLUGININFOEX pluginInfo = +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -18,14 +21,16 @@ PLUGININFOEX pluginInfo = { 0x68f5a030, 0xba32, 0x48ec, { 0x95, 0x7, 0x5c, 0x2f, 0xbd, 0xea, 0x52, 0x17 }} }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("STEAM", pluginInfoEx) { - return &pluginInfo; + SetUniqueId("SteamID"); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -35,7 +40,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); char iconName[100]; mir_snprintf(iconName, "%s_%s", MODULE, "gaming"); diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 4298d45737..39c1b7a2be 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -276,11 +276,7 @@ protected: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("STEAM") - { - SetUniqueId("SteamID"); - } + CMPlugin(); }; int OnReloadIcons(WPARAM wParam, LPARAM lParam); -- cgit v1.2.3