From 35d5b1cc47ac444524c087615033d5856f8a5dc3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 10 Apr 2025 16:45:33 +0300 Subject: no need to declare the same template in each protocol --- protocols/Steam/src/steam_menus.cpp | 13 +++---------- protocols/Steam/src/steam_proto.h | 6 +++--- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index d82d3e46cf..1926c27179 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -3,13 +3,6 @@ int CSteamProto::hChooserMenu; HGENMENU CSteamProto::contactMenuItems[CMI_MAX]; -template -INT_PTR GlobalService(WPARAM hContact, LPARAM lParam) -{ - CSteamProto *ppro = CMPlugin::getInstance((MCONTACT)hContact); - return ppro ? (ppro->*Service)(hContact, lParam) : 0; -} - INT_PTR CSteamProto::AuthRequestCommand(WPARAM hContact, LPARAM) { ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0); @@ -22,19 +15,19 @@ INT_PTR CSteamProto::AuthRevokeCommand(WPARAM hContact, LPARAM) return 0; } -int CSteamProto::BlockCommand(WPARAM hContact, LPARAM) +INT_PTR CSteamProto::BlockCommand(WPARAM hContact, LPARAM) { SendUserIgnoreRequest(hContact, true); return 0; } -int CSteamProto::UnblockCommand(WPARAM hContact, LPARAM) +INT_PTR CSteamProto::UnblockCommand(WPARAM hContact, LPARAM) { SendUserIgnoreRequest(hContact, false); return 0; } -int CSteamProto::JoinToGameCommand(WPARAM hContact, LPARAM) +INT_PTR CSteamProto::JoinToGameCommand(WPARAM hContact, LPARAM) { char url[MAX_PATH]; uint32_t gameId = getDword(hContact, "GameID", 0); diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 360a7403b3..f21bcb4869 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -300,9 +300,9 @@ class CSteamProto : public PROTO INT_PTR __cdecl AuthRequestCommand(WPARAM, LPARAM); INT_PTR __cdecl AuthRevokeCommand(WPARAM, LPARAM); - int __cdecl BlockCommand(WPARAM, LPARAM); - int __cdecl UnblockCommand(WPARAM, LPARAM); - int __cdecl JoinToGameCommand(WPARAM, LPARAM); + INT_PTR __cdecl BlockCommand(WPARAM, LPARAM); + INT_PTR __cdecl UnblockCommand(WPARAM, LPARAM); + INT_PTR __cdecl JoinToGameCommand(WPARAM, LPARAM); INT_PTR __cdecl OpenBlockListCommand(WPARAM, LPARAM); -- cgit v1.2.3