From ba877b6e780bfbe341caad92bcae07640f3c7532 Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Fri, 5 Aug 2022 01:32:20 -0400 Subject: [PATCH] sdk 1.55 --- dll/flat.cpp | 10 ++++++++++ dll/steam_apps.cpp | 7 +++++++ dll/steam_apps.h | 3 +++ dll/steam_controller.h | 6 ++++++ sdk_includes/isteamapps.h | 5 ++++- sdk_includes/isteaminput.h | 8 ++++++++ sdk_includes/steam_api_flat.h | 3 +++ sdk_includes/steamclientpublic.h | 1 + sdk_includes/steamnetworkingtypes.h | 2 ++ 9 files changed, 44 insertions(+), 1 deletion(-) diff --git a/dll/flat.cpp b/dll/flat.cpp index 579c224..a407eea 100644 --- a/dll/flat.cpp +++ b/dll/flat.cpp @@ -2497,6 +2497,11 @@ STEAMAPI_API steam_bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uin return self->BIsTimedTrial(punSecondsAllowed, punSecondsPlayed); } +STEAMAPI_API steam_bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID ) +{ + return self->SetDlcContext(nAppID); +} + STEAMAPI_API ISteamNetworking *SteamAPI_SteamNetworking_v006() { return get_steam_client()->GetISteamNetworking(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworking006"); @@ -3288,6 +3293,11 @@ STEAMAPI_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( I return (get_steam_client()->steam_controller)->GetSessionInputConfigurationSettings(); } +STEAMAPI_API void SteamAPI_ISteamInput_SetDualSenseTriggerEffect( ISteamInput* self, InputHandle_t inputHandle, const ScePadTriggerEffectParam * pParam ) +{ + return (get_steam_client()->steam_controller)->SetDualSenseTriggerEffect(inputHandle, pParam); +} + STEAMAPI_API ISteamController *SteamAPI_SteamController_v007() { return get_steam_client()->GetISteamController(flat_hsteamuser(), flat_hsteampipe(), "SteamController007"); diff --git a/dll/steam_apps.cpp b/dll/steam_apps.cpp index 6bd52d5..fc75bf4 100644 --- a/dll/steam_apps.cpp +++ b/dll/steam_apps.cpp @@ -337,3 +337,10 @@ bool Steam_Apps::BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPla PRINT_DEBUG("BIsTimedTrial\n"); return false; } + +// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions +bool Steam_Apps::SetDlcContext( AppId_t nAppID ) +{ + PRINT_DEBUG("SetDlcContext %u\n", nAppID); + return true; +} diff --git a/dll/steam_apps.h b/dll/steam_apps.h index b46c22a..1a4f206 100644 --- a/dll/steam_apps.h +++ b/dll/steam_apps.h @@ -106,4 +106,7 @@ public: // check if game is a timed trial with limited playtime bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ); + + // set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions + bool SetDlcContext( AppId_t nAppID ); }; diff --git a/dll/steam_controller.h b/dll/steam_controller.h index 1d30c09..64b7f4f 100644 --- a/dll/steam_controller.h +++ b/dll/steam_controller.h @@ -1231,6 +1231,12 @@ uint16 GetSessionInputConfigurationSettings() return 0; } +// Set the trigger effect for a DualSense controller +void SetDualSenseTriggerEffect( InputHandle_t inputHandle, const ScePadTriggerEffectParam *pParam ) +{ + PRINT_DEBUG("TODO %s\n", __FUNCTION__); +} + void RunCallbacks() { if (explicitly_call_run_frame) { diff --git a/sdk_includes/isteamapps.h b/sdk_includes/isteamapps.h index 984cb50..f0afe97 100644 --- a/sdk_includes/isteamapps.h +++ b/sdk_includes/isteamapps.h @@ -107,7 +107,10 @@ public: virtual bool BIsSubscribedFromFamilySharing() = 0; // check if game is a timed trial with limited playtime - virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0; + virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0; + + // set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions + virtual bool SetDlcContext( AppId_t nAppID ) = 0; }; #define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008" diff --git a/sdk_includes/isteaminput.h b/sdk_includes/isteaminput.h index 2bf7a75..ebbd8ec 100644 --- a/sdk_includes/isteaminput.h +++ b/sdk_includes/isteaminput.h @@ -704,6 +704,11 @@ struct SteamInputActionEvent_t } x; }; +//----------------------------------------------------------------------------- +// Forward declaration for ScePadTriggerEffectParam, defined in isteamdualsense.h +//----------------------------------------------------------------------------- +struct ScePadTriggerEffectParam; + #pragma pack( pop ) typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * ); @@ -917,6 +922,9 @@ public: // Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.? // Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration virtual uint16 GetSessionInputConfigurationSettings() = 0; + + // Set the trigger effect for a DualSense controller + virtual void SetDualSenseTriggerEffect( InputHandle_t inputHandle, const ScePadTriggerEffectParam *pParam ) = 0; }; #define STEAMINPUT_INTERFACE_VERSION "SteamInput006" diff --git a/sdk_includes/steam_api_flat.h b/sdk_includes/steam_api_flat.h index 839d0ab..1b1877c 100644 --- a/sdk_includes/steam_api_flat.h +++ b/sdk_includes/steam_api_flat.h @@ -477,6 +477,8 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails( ISteamApps* self STEAMAPI_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * pszCommandLine, int cubCommandLine ); STEAMAPI_API steam_bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self ); STEAMAPI_API steam_bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed ); +STEAMAPI_API steam_bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID ); + // ISteamNetworking STEAMAPI_API ISteamNetworking *SteamAPI_SteamNetworking_v006(); @@ -647,6 +649,7 @@ STEAMAPI_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin( ISte STEAMAPI_API steam_bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor ); STEAMAPI_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle ); STEAMAPI_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self ); +STEAMAPI_API void SteamAPI_ISteamInput_SetDualSenseTriggerEffect( ISteamInput* self, InputHandle_t inputHandle, const ScePadTriggerEffectParam * pParam ); // ISteamController STEAMAPI_API ISteamController *SteamAPI_SteamController_v007(); diff --git a/sdk_includes/steamclientpublic.h b/sdk_includes/steamclientpublic.h index 98df1d9..2c6ee8d 100644 --- a/sdk_includes/steamclientpublic.h +++ b/sdk_includes/steamclientpublic.h @@ -152,6 +152,7 @@ enum EResult k_EResultInsufficientBattery = 124, // user device doesn't have enough battery charge currently to complete the action k_EResultChargerRequired = 125, // The operation requires a charger to be plugged in, which wasn't present k_EResultCachedCredentialInvalid = 126, // Cached credential was invalid - user must reauthenticate + K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number }; // Error codes for use with the voice functions diff --git a/sdk_includes/steamnetworkingtypes.h b/sdk_includes/steamnetworkingtypes.h index 540980a..7be771d 100644 --- a/sdk_includes/steamnetworkingtypes.h +++ b/sdk_includes/steamnetworkingtypes.h @@ -1718,7 +1718,9 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString( const char template inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, char (&szCode)[N] ) { +#if !defined( __GNUC__ ) || __GNUC__ >= 5 static_assert( N >= 5, "Fixed-size buffer not big enough to hold SDR POP ID" ); +#endif szCode[0] = char( id >> 16U ); szCode[1] = char( id >> 8U ); szCode[2] = char( id );