Skip to content

Commit 83a8b6c

Browse files
committed
Update to Steamworks 1.45 with Steamworks.NET@f61d0c5
1 parent 747fe28 commit 83a8b6c

19 files changed

+286
-51
lines changed

Assets/Plugins/Steamworks.NET/Steam.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
namespace Steamworks {
1818
public static class Version {
1919
public const string SteamworksNETVersion = "13.0.0";
20-
public const string SteamworksSDKVersion = "1.43";
21-
public const string SteamAPIDLLVersion = "04.95.20.30";
22-
public const int SteamAPIDLLSize = 257312;
23-
public const int SteamAPI64DLLSize = 288032;
20+
public const string SteamworksSDKVersion = "1.45";
21+
public const string SteamAPIDLLVersion = "05.19.38.62";
22+
public const int SteamAPIDLLSize = 259360;
23+
public const int SteamAPI64DLLSize = 289056;
2424
}
2525

2626
public static class SteamAPI {
@@ -257,6 +257,11 @@ public static byte[] GetUserVariableData(byte[] rgubTicketDecrypted, uint cubTic
257257
System.Runtime.InteropServices.Marshal.Copy(punSecretData, ret, 0, (int)pcubUserData);
258258
return ret;
259259
}
260+
261+
public static bool BIsTicketSigned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, byte[] pubRSAKey, uint cubRSAKey) {
262+
InteropHelp.TestIfPlatformSupported();
263+
return NativeMethods.SteamEncryptedAppTicket_BIsTicketSigned(rgubTicketDecrypted, cubTicketDecrypted, pubRSAKey, cubRSAKey);
264+
}
260265
}
261266

262267
internal static class CSteamAPIContext {

Assets/Plugins/Steamworks.NET/autogen/NativeMethods.cs

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,31 +163,35 @@ internal static class NativeMethods {
163163
#region steamencryptedappticket.h
164164
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
165165
[return: MarshalAs(UnmanagedType.I1)]
166-
public static extern bool SteamEncryptedAppTicket_BDecryptTicket(byte[] rgubTicketEncrypted, uint cubTicketEncrypted, byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, [MarshalAs(UnmanagedType.LPArray, SizeConst=Constants.k_nSteamEncryptedAppTicketSymmetricKeyLen)] byte[] rgubKey, int cubKey);
166+
public static extern bool SteamEncryptedAppTicket_BDecryptTicket([In, Out] byte[] rgubTicketEncrypted, uint cubTicketEncrypted, [In, Out] byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, [MarshalAs(UnmanagedType.LPArray, SizeConst=Constants.k_nSteamEncryptedAppTicketSymmetricKeyLen)] byte[] rgubKey, int cubKey);
167167

168168
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
169169
[return: MarshalAs(UnmanagedType.I1)]
170-
public static extern bool SteamEncryptedAppTicket_BIsTicketForApp(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID);
170+
public static extern bool SteamEncryptedAppTicket_BIsTicketForApp([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID);
171171

172172
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
173-
public static extern uint SteamEncryptedAppTicket_GetTicketIssueTime(byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
173+
public static extern uint SteamEncryptedAppTicket_GetTicketIssueTime([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
174174

175175
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
176-
public static extern void SteamEncryptedAppTicket_GetTicketSteamID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID);
176+
public static extern void SteamEncryptedAppTicket_GetTicketSteamID([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID);
177177

178178
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
179-
public static extern uint SteamEncryptedAppTicket_GetTicketAppID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
179+
public static extern uint SteamEncryptedAppTicket_GetTicketAppID([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
180180

181181
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
182182
[return: MarshalAs(UnmanagedType.I1)]
183-
public static extern bool SteamEncryptedAppTicket_BUserOwnsAppInTicket(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID);
183+
public static extern bool SteamEncryptedAppTicket_BUserOwnsAppInTicket([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID);
184184

185185
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
186186
[return: MarshalAs(UnmanagedType.I1)]
187-
public static extern bool SteamEncryptedAppTicket_BUserIsVacBanned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
187+
public static extern bool SteamEncryptedAppTicket_BUserIsVacBanned([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted);
188188

189189
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
190-
public static extern IntPtr SteamEncryptedAppTicket_GetUserVariableData(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out uint pcubUserData);
190+
public static extern IntPtr SteamEncryptedAppTicket_GetUserVariableData([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out uint pcubUserData);
191+
192+
[DllImport(NativeLibrary_SDKEncryptedAppTicket, CallingConvention = CallingConvention.Cdecl)]
193+
[return: MarshalAs(UnmanagedType.I1)]
194+
public static extern bool SteamEncryptedAppTicket_BIsTicketSigned([In, Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, [In, Out] byte[] pubRSAKey, uint cubRSAKey);
191195
#endregion
192196
#region SteamAppList
193197
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps", CallingConvention = CallingConvention.Cdecl)]
@@ -445,7 +449,7 @@ internal static class NativeMethods {
445449
public static extern void ISteamController_DeactivateAllActionSetLayers(IntPtr instancePtr, ControllerHandle_t controllerHandle);
446450

447451
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers", CallingConvention = CallingConvention.Cdecl)]
448-
public static extern int ISteamController_GetActiveActionSetLayers(IntPtr instancePtr, ControllerHandle_t controllerHandle, out ControllerActionSetHandle_t handlesOut);
452+
public static extern int ISteamController_GetActiveActionSetLayers(IntPtr instancePtr, ControllerHandle_t controllerHandle, [In, Out] ControllerActionSetHandle_t[] handlesOut);
449453

450454
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle", CallingConvention = CallingConvention.Cdecl)]
451455
public static extern ulong ISteamController_GetDigitalActionHandle(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszActionName);
@@ -513,6 +517,10 @@ internal static class NativeMethods {
513517

514518
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin", CallingConvention = CallingConvention.Cdecl)]
515519
public static extern EControllerActionOrigin ISteamController_TranslateActionOrigin(IntPtr instancePtr, ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin);
520+
521+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision", CallingConvention = CallingConvention.Cdecl)]
522+
[return: MarshalAs(UnmanagedType.I1)]
523+
public static extern bool ISteamController_GetControllerBindingRevision(IntPtr instancePtr, ControllerHandle_t controllerHandle, out int pMajor, out int pMinor);
516524
#endregion
517525
#region SteamFriends
518526
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName", CallingConvention = CallingConvention.Cdecl)]
@@ -1178,7 +1186,7 @@ internal static class NativeMethods {
11781186
public static extern void ISteamInput_DeactivateAllActionSetLayers(IntPtr instancePtr, InputHandle_t inputHandle);
11791187

11801188
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers", CallingConvention = CallingConvention.Cdecl)]
1181-
public static extern int ISteamInput_GetActiveActionSetLayers(IntPtr instancePtr, InputHandle_t inputHandle, out InputActionSetHandle_t handlesOut);
1189+
public static extern int ISteamInput_GetActiveActionSetLayers(IntPtr instancePtr, InputHandle_t inputHandle, [In, Out] InputActionSetHandle_t[] handlesOut);
11821190

11831191
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = CallingConvention.Cdecl)]
11841192
public static extern ulong ISteamInput_GetDigitalActionHandle(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszActionName);
@@ -1246,6 +1254,10 @@ internal static class NativeMethods {
12461254

12471255
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin", CallingConvention = CallingConvention.Cdecl)]
12481256
public static extern EInputActionOrigin ISteamInput_TranslateActionOrigin(IntPtr instancePtr, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin);
1257+
1258+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision", CallingConvention = CallingConvention.Cdecl)]
1259+
[return: MarshalAs(UnmanagedType.I1)]
1260+
public static extern bool ISteamInput_GetDeviceBindingRevision(IntPtr instancePtr, InputHandle_t inputHandle, out int pMajor, out int pMinor);
12491261
#endregion
12501262
#region SteamInventory
12511263
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus", CallingConvention = CallingConvention.Cdecl)]
@@ -2219,6 +2231,10 @@ internal static class NativeMethods {
22192231
[return: MarshalAs(UnmanagedType.I1)]
22202232
public static extern bool ISteamUGC_GetQueryUGCKeyValueTag(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize);
22212233

2234+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag0", CallingConvention = CallingConvention.Cdecl)]
2235+
[return: MarshalAs(UnmanagedType.I1)]
2236+
public static extern bool ISteamUGC_GetQueryUGCKeyValueTag0(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, InteropHelp.UTF8StringHandle pchKey, IntPtr pchValue, uint cchValueSize);
2237+
22222238
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest", CallingConvention = CallingConvention.Cdecl)]
22232239
[return: MarshalAs(UnmanagedType.I1)]
22242240
public static extern bool ISteamUGC_ReleaseQueryUGCRequest(IntPtr instancePtr, UGCQueryHandle_t handle);
@@ -2336,6 +2352,10 @@ internal static class NativeMethods {
23362352
[return: MarshalAs(UnmanagedType.I1)]
23372353
public static extern bool ISteamUGC_SetAllowLegacyUpload(IntPtr instancePtr, UGCUpdateHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bAllowLegacyUpload);
23382354

2355+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags", CallingConvention = CallingConvention.Cdecl)]
2356+
[return: MarshalAs(UnmanagedType.I1)]
2357+
public static extern bool ISteamUGC_RemoveAllItemKeyValueTags(IntPtr instancePtr, UGCUpdateHandle_t handle);
2358+
23392359
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags", CallingConvention = CallingConvention.Cdecl)]
23402360
[return: MarshalAs(UnmanagedType.I1)]
23412361
public static extern bool ISteamUGC_RemoveItemKeyValueTags(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchKey);
@@ -2541,6 +2561,9 @@ internal static class NativeMethods {
25412561

25422562
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility", CallingConvention = CallingConvention.Cdecl)]
25432563
public static extern ulong ISteamUser_GetMarketEligibility(IntPtr instancePtr);
2564+
2565+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUser_GetDurationControl", CallingConvention = CallingConvention.Cdecl)]
2566+
public static extern ulong ISteamUser_GetDurationControl(IntPtr instancePtr);
25442567
#endregion
25452568
#region SteamUserStats
25462569
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats", CallingConvention = CallingConvention.Cdecl)]
@@ -2808,6 +2831,17 @@ internal static class NativeMethods {
28082831

28092832
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled", CallingConvention = CallingConvention.Cdecl)]
28102833
public static extern void ISteamUtils_SetVRHeadsetStreamingEnabled(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bEnabled);
2834+
2835+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamChinaLauncher", CallingConvention = CallingConvention.Cdecl)]
2836+
[return: MarshalAs(UnmanagedType.I1)]
2837+
public static extern bool ISteamUtils_IsSteamChinaLauncher(IntPtr instancePtr);
2838+
2839+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUtils_InitFilterText", CallingConvention = CallingConvention.Cdecl)]
2840+
[return: MarshalAs(UnmanagedType.I1)]
2841+
public static extern bool ISteamUtils_InitFilterText(IntPtr instancePtr);
2842+
2843+
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamUtils_FilterText", CallingConvention = CallingConvention.Cdecl)]
2844+
public static extern int ISteamUtils_FilterText(IntPtr instancePtr, IntPtr pchOutFilteredText, uint nByteSizeOutFilteredText, InteropHelp.UTF8StringHandle pchInputMessage, [MarshalAs(UnmanagedType.I1)] bool bLegalOnly);
28112845
#endregion
28122846
#region SteamVideo
28132847
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL", CallingConvention = CallingConvention.Cdecl)]

Assets/Plugins/Steamworks.NET/autogen/SteamCallbacks.cs

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,6 +2210,29 @@ public struct MarketEligibilityResponse_t {
22102210
public int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device
22112211
}
22122212

2213+
//-----------------------------------------------------------------------------
2214+
// Purpose: sent for games with enabled anti indulgence / duration control, for
2215+
// enabled users. Lets the game know whether persistent rewards or XP should be
2216+
// granted at normal rate, half rate, or zero rate.
2217+
//
2218+
// This callback is fired asynchronously in response to timers triggering.
2219+
// It is also fired in response to calls to GetDurationControl().
2220+
//-----------------------------------------------------------------------------
2221+
[StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
2222+
[CallbackIdentity(Constants.k_iSteamUserCallbacks + 67)]
2223+
public struct DurationControl_t {
2224+
public const int k_iCallback = Constants.k_iSteamUserCallbacks + 67;
2225+
2226+
public EResult m_eResult; // result of call (always k_EResultOK for asynchronous timer-based notifications)
2227+
public AppId_t m_appid; // appid generating playtime
2228+
2229+
[MarshalAs(UnmanagedType.I1)]
2230+
public bool m_bApplicable; // is duration control applicable to user + game combination
2231+
public int m_csecsLast5h; // playtime in trailing 5 hour window plus current session, in seconds
2232+
public EDurationControlProgress m_progress; // recommended progress
2233+
public EDurationControlNotification m_notification; // notification to show, if any (always k_EDurationControlNotification_None for API calls)
2234+
}
2235+
22132236
// callbacks
22142237
//-----------------------------------------------------------------------------
22152238
// Purpose: called when the latests stats and achievements have been received
@@ -2432,19 +2455,6 @@ public struct GamepadTextInputDismissed_t {
24322455
public uint m_unSubmittedText;
24332456
}
24342457

2435-
[StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)]
2436-
[CallbackIdentity(Constants.k_iClientVideoCallbacks + 4)]
2437-
public struct BroadcastUploadStart_t {
2438-
public const int k_iCallback = Constants.k_iClientVideoCallbacks + 4;
2439-
}
2440-
2441-
[StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
2442-
[CallbackIdentity(Constants.k_iClientVideoCallbacks + 5)]
2443-
public struct BroadcastUploadStop_t {
2444-
public const int k_iCallback = Constants.k_iClientVideoCallbacks + 5;
2445-
public EBroadcastUploadResult m_eResult;
2446-
}
2447-
24482458
[StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
24492459
[CallbackIdentity(Constants.k_iClientVideoCallbacks + 11)]
24502460
public struct GetVideoURLResult_t {

Assets/Plugins/Steamworks.NET/autogen/SteamConstants.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class Constants {
3939
public const string STEAMPARTIES_INTERFACE_VERSION = "SteamParties002";
4040
public const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014";
4141
public const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003";
42-
public const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION012";
42+
public const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION013";
4343
public const string STEAMUSER_INTERFACE_VERSION = "SteamUser020";
4444
public const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION011";
4545
public const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils009";
@@ -128,6 +128,7 @@ public static class Constants {
128128
public const int k_iSteamNetworkingCallbacks = 1200;
129129
public const int k_iSteamNetworkingSocketsCallbacks = 1220;
130130
public const int k_iSteamNetworkingMessagesCallbacks = 1250;
131+
public const int k_iSteamNetworkingUtilsCallbacks = 1280;
131132
public const int k_iClientRemoteStorageCallbacks = 1300;
132133
public const int k_iClientDepotBuilderCallbacks = 1400;
133134
public const int k_iSteamGameServerItemsCallbacks = 1500;
@@ -170,6 +171,8 @@ public static class Constants {
170171
public const int k_iSteamGameSearchCallbacks = 5200;
171172
public const int k_iSteamPartiesCallbacks = 5300;
172173
public const int k_iClientPartiesCallbacks = 5400;
174+
public const int k_iSteamSTARCallbacks = 5500;
175+
public const int k_iClientSTARCallbacks = 5600;
173176
public const int k_unSteamAccountIDMask = -1;
174177
public const int k_unSteamAccountInstanceMask = 0x000FFFFF;
175178
// we allow 3 simultaneous user account instances right now, 1= desktop, 2 = console, 4 = web, 0 = all
@@ -182,7 +185,6 @@ public static class Constants {
182185
public const ulong k_GIDNil = 0xffffffffffffffff;
183186
public const ulong k_TxnIDNil = k_GIDNil;
184187
public const ulong k_TxnIDUnknown = 0;
185-
public const int k_uPackageIdFreeSub = 0x0;
186188
public const int k_uPackageIdInvalid = -1;
187189
public const ulong k_ulAssetClassIdInvalid = 0x0;
188190
public const int k_uPhysicalItemIdInvalid = 0x0;
@@ -193,6 +195,7 @@ public static class Constants {
193195
public const int STEAM_CONTROLLER_MAX_ANALOG_ACTIONS = 16;
194196
public const int STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS = 128;
195197
public const int STEAM_CONTROLLER_MAX_ORIGINS = 8;
198+
public const int STEAM_CONTROLLER_MAX_ACTIVE_LAYERS = 16;
196199
// When sending an option to a specific controller handle, you can send to all controllers via this command
197200
public const ulong STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS = 0xFFFFFFFFFFFFFFFF;
198201
public const float STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA = -1.0f;
@@ -203,6 +206,7 @@ public static class Constants {
203206
public const int STEAM_INPUT_MAX_ANALOG_ACTIONS = 16;
204207
public const int STEAM_INPUT_MAX_DIGITAL_ACTIONS = 128;
205208
public const int STEAM_INPUT_MAX_ORIGINS = 8;
209+
public const int STEAM_INPUT_MAX_ACTIVE_LAYERS = 16;
206210
// When sending an option to a specific controller handle, you can send to all devices via this command
207211
public const ulong STEAM_INPUT_HANDLE_ALL_CONTROLLERS = 0xFFFFFFFFFFFFFFFF;
208212
public const float STEAM_INPUT_MIN_ANALOG_ACTION_DATA = -1.0f;

0 commit comments

Comments
 (0)