mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Pass ** as ref
This commit is contained in:
parent
ee7e4e076a
commit
6fa147141a
@ -34,13 +34,13 @@ public override void InitInternals()
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate HServerListRequest RequestInternetServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
public delegate HServerListRequest RequestInternetServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private RequestInternetServerListDelegate RequestInternetServerListDelegatePointer;
|
||||
|
||||
#endregion
|
||||
public HServerListRequest RequestInternetServerList( AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
public HServerListRequest RequestInternetServerList( AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
return RequestInternetServerListDelegatePointer( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
|
||||
return RequestInternetServerListDelegatePointer( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
@ -56,46 +56,46 @@ public HServerListRequest RequestLANServerList( AppId_t iApp, IntPtr pRequestSer
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate HServerListRequest RequestFriendsServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
public delegate HServerListRequest RequestFriendsServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private RequestFriendsServerListDelegate RequestFriendsServerListDelegatePointer;
|
||||
|
||||
#endregion
|
||||
public HServerListRequest RequestFriendsServerList( AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
public HServerListRequest RequestFriendsServerList( AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
return RequestFriendsServerListDelegatePointer( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
|
||||
return RequestFriendsServerListDelegatePointer( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate HServerListRequest RequestFavoritesServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
public delegate HServerListRequest RequestFavoritesServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private RequestFavoritesServerListDelegate RequestFavoritesServerListDelegatePointer;
|
||||
|
||||
#endregion
|
||||
public HServerListRequest RequestFavoritesServerList( AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
public HServerListRequest RequestFavoritesServerList( AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
return RequestFavoritesServerListDelegatePointer( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
|
||||
return RequestFavoritesServerListDelegatePointer( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate HServerListRequest RequestHistoryServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
public delegate HServerListRequest RequestHistoryServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private RequestHistoryServerListDelegate RequestHistoryServerListDelegatePointer;
|
||||
|
||||
#endregion
|
||||
public HServerListRequest RequestHistoryServerList( AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
public HServerListRequest RequestHistoryServerList( AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
return RequestHistoryServerListDelegatePointer( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
|
||||
return RequestHistoryServerListDelegatePointer( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate HServerListRequest RequestSpectatorServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
public delegate HServerListRequest RequestSpectatorServerListDelegate( IntPtr self, AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private RequestSpectatorServerListDelegate RequestSpectatorServerListDelegatePointer;
|
||||
|
||||
#endregion
|
||||
public HServerListRequest RequestSpectatorServerList( AppId_t iApp, [In,Out] MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
public HServerListRequest RequestSpectatorServerList( AppId_t iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
return RequestSpectatorServerListDelegatePointer( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
|
||||
return RequestSpectatorServerListDelegatePointer( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
|
@ -15,7 +15,7 @@ public class ServerListFavourites : BaseServerList
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestFavoritesServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
|
||||
request = Internal.RequestFavoritesServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ public class ServerListFriends : BaseServerList
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestFriendsServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
|
||||
request = Internal.RequestFriendsServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ public class ServerListHistory : BaseServerList
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestHistoryServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
|
||||
request = Internal.RequestHistoryServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
|
||||
request = Internal.RequestInternetServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
|
||||
request = Internal.RequestInternetServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@ public static BaseType Parse( string type, string varname = null )
|
||||
return new BaseType { NativeType = type, VarName = varname };
|
||||
}
|
||||
|
||||
public virtual string AsArgument() => IsVector? $"[In,Out] {TypeName.Trim( '*', ' ' )}[] {VarName}" : $"{Ref}{TypeName.Trim( '*', ' ' )} {VarName}";
|
||||
public virtual string AsArgument() => IsVector? $"[In,Out] {Ref}{TypeName.Trim( '*', ' ' )}[] {VarName}" : $"{Ref}{TypeName.Trim( '*', ' ' )} {VarName}";
|
||||
public virtual string AsCallArgument() => $"{Ref}{VarName}";
|
||||
|
||||
public virtual string Return( string varname ) => $"return {varname};";
|
||||
@ -48,7 +48,7 @@ public static BaseType Parse( string type, string varname = null )
|
||||
|
||||
public virtual string ReturnType => TypeName;
|
||||
|
||||
public virtual string Ref => !IsVector && NativeType.EndsWith( "*" ) ? "ref " : "";
|
||||
public virtual string Ref => !IsVector && NativeType.EndsWith( "*" ) || NativeType.EndsWith( "**" ) ? "ref " : "";
|
||||
public virtual bool IsVector => (NativeType.EndsWith( "*" ) && (VarName.StartsWith( "pvec" ) || VarName.StartsWith( "pub" ) || VarName.StartsWith( "pOut" )))
|
||||
|| NativeType.EndsWith( "**" )
|
||||
|| VarName == "psteamIDClans";
|
||||
|
Loading…
Reference in New Issue
Block a user