mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 07:08:05 +03:00
Pass ** as ref
This commit is contained in:
parent
ee7e4e076a
commit
6fa147141a
@ -34,13 +34,13 @@ namespace Steamworks.Internal
|
|||||||
|
|
||||||
#region FunctionMeta
|
#region FunctionMeta
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[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;
|
private RequestInternetServerListDelegate RequestInternetServerListDelegatePointer;
|
||||||
|
|
||||||
#endregion
|
#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
|
#region FunctionMeta
|
||||||
@ -56,46 +56,46 @@ namespace Steamworks.Internal
|
|||||||
|
|
||||||
#region FunctionMeta
|
#region FunctionMeta
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[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;
|
private RequestFriendsServerListDelegate RequestFriendsServerListDelegatePointer;
|
||||||
|
|
||||||
#endregion
|
#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
|
#region FunctionMeta
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[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;
|
private RequestFavoritesServerListDelegate RequestFavoritesServerListDelegatePointer;
|
||||||
|
|
||||||
#endregion
|
#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
|
#region FunctionMeta
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[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;
|
private RequestHistoryServerListDelegate RequestHistoryServerListDelegatePointer;
|
||||||
|
|
||||||
#endregion
|
#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
|
#region FunctionMeta
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[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;
|
private RequestSpectatorServerListDelegate RequestSpectatorServerListDelegatePointer;
|
||||||
|
|
||||||
#endregion
|
#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
|
#region FunctionMeta
|
||||||
|
@ -15,7 +15,7 @@ namespace Steamworks
|
|||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
||||||
var filters = GetFilters();
|
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 @@ namespace Steamworks
|
|||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
||||||
var filters = GetFilters();
|
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 @@ namespace Steamworks
|
|||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
||||||
var filters = GetFilters();
|
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 @@ namespace Steamworks
|
|||||||
{
|
{
|
||||||
var filters = GetFilters();
|
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 @@ internal class BaseType
|
|||||||
return new BaseType { NativeType = type, VarName = varname };
|
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 AsCallArgument() => $"{Ref}{VarName}";
|
||||||
|
|
||||||
public virtual string Return( string varname ) => $"return {varname};";
|
public virtual string Return( string varname ) => $"return {varname};";
|
||||||
@ -48,7 +48,7 @@ internal class BaseType
|
|||||||
|
|
||||||
public virtual string ReturnType => TypeName;
|
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" )))
|
public virtual bool IsVector => (NativeType.EndsWith( "*" ) && (VarName.StartsWith( "pvec" ) || VarName.StartsWith( "pub" ) || VarName.StartsWith( "pOut" )))
|
||||||
|| NativeType.EndsWith( "**" )
|
|| NativeType.EndsWith( "**" )
|
||||||
|| VarName == "psteamIDClans";
|
|| VarName == "psteamIDClans";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user