From db61ec1f1e3e1cf88b34cbfa8d2b78233b963bc6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Fri, 10 Jun 2022 12:26:24 +0300 Subject: [PATCH] lsteamclient: Wrap EnableActionEventCallbacks's callback also for SteamInput006. --- lsteamclient/cppISteamInput_SteamInput006.cpp | 5 ----- lsteamclient/gen_wrapper.py | 1 + lsteamclient/steamclient_manual_153a.cpp | 10 ++++++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lsteamclient/cppISteamInput_SteamInput006.cpp b/lsteamclient/cppISteamInput_SteamInput006.cpp index e07c1735..8ddc4fd8 100644 --- a/lsteamclient/cppISteamInput_SteamInput006.cpp +++ b/lsteamclient/cppISteamInput_SteamInput006.cpp @@ -51,11 +51,6 @@ void cppISteamInput_SteamInput006_EnableDeviceCallbacks(void *linux_side) ((ISteamInput*)linux_side)->EnableDeviceCallbacks(); } -void cppISteamInput_SteamInput006_EnableActionEventCallbacks(void *linux_side, SteamInputActionEventCallbackPointer pCallback) -{ - ((ISteamInput*)linux_side)->EnableActionEventCallbacks((SteamInputActionEventCallbackPointer)pCallback); -} - InputActionSetHandle_t cppISteamInput_SteamInput006_GetActionSetHandle(void *linux_side, const char * pszActionSetName) { return ((ISteamInput*)linux_side)->GetActionSetHandle((const char *)pszActionSetName); diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py index 6671135d..f0520844 100755 --- a/lsteamclient/gen_wrapper.py +++ b/lsteamclient/gen_wrapper.py @@ -249,6 +249,7 @@ manually_handled_methods = { "GetGlyphForXboxOrigin" ], "cppISteamInput_SteamInput006": [ + "EnableActionEventCallbacks", "GetGlyphPNGForActionOrigin", "GetGlyphSVGForActionOrigin", "GetGlyphForActionOrigin_Legacy", diff --git a/lsteamclient/steamclient_manual_153a.cpp b/lsteamclient/steamclient_manual_153a.cpp index 79d0b775..4270a69f 100644 --- a/lsteamclient/steamclient_manual_153a.cpp +++ b/lsteamclient/steamclient_manual_153a.cpp @@ -27,6 +27,16 @@ extern "C" { #include "queue.h" +/***** manual fn wrapper for ISteamInput::EnableActionEventCallbacks *****/ +extern win_SteamInputActionEventCallbackPointer win_EnableActionEventCallbacks; + +void cppISteamInput_SteamInput006_EnableActionEventCallbacks(void *linux_side, win_SteamInputActionEventCallbackPointer pCallback) +{ + win_EnableActionEventCallbacks = pCallback; + ((ISteamInput*)linux_side)->EnableActionEventCallbacks(pCallback ? &lin_SteamInputActionEventCallbackPointer : NULL); +} + + /***** manual struct converter for SteamNetworkingMessage_t *****/ struct msg_wrapper {