mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 22:58:01 +03:00
intptr_t => IntPtr
This commit is contained in:
parent
f562e65149
commit
a05760c76a
@ -261,10 +261,10 @@ namespace Steamworks
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
private static extern bool _SetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValue( NetConfig eValue, NetConfigScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg )
|
||||
internal bool SetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg )
|
||||
{
|
||||
var returnValue = _SetConfigValue( Self, eValue, eScopeType, scopeObj, eDataType, pArg );
|
||||
return returnValue;
|
||||
@ -273,10 +273,10 @@ namespace Steamworks
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValueStruct( IntPtr self, ref NetKeyValue opt, NetConfigScope eScopeType, long scopeObj );
|
||||
private static extern bool _SetConfigValueStruct( IntPtr self, ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValueStruct( ref NetKeyValue opt, NetConfigScope eScopeType, long scopeObj )
|
||||
internal bool SetConfigValueStruct( ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj )
|
||||
{
|
||||
var returnValue = _SetConfigValueStruct( Self, ref opt, eScopeType, scopeObj );
|
||||
return returnValue;
|
||||
@ -284,10 +284,10 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValue", CallingConvention = Platform.CC)]
|
||||
private static extern NetConfigResult _GetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult );
|
||||
private static extern NetConfigResult _GetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult );
|
||||
|
||||
#endregion
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetConfigScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult )
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult )
|
||||
{
|
||||
var returnValue = _GetConfigValue( Self, eValue, eScopeType, scopeObj, ref pOutDataType, pResult, ref cbResult );
|
||||
return returnValue;
|
||||
|
@ -150,7 +150,7 @@ namespace Steamworks
|
||||
internal unsafe static bool GetConfigInt( NetConfig type, int value )
|
||||
{
|
||||
int* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, 0, NetConfigType.Int32, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Int32, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static int GetConfigInt( NetConfig type )
|
||||
@ -159,7 +159,7 @@ namespace Steamworks
|
||||
NetConfigType dtype = NetConfigType.Int32;
|
||||
int* ptr = &value;
|
||||
UIntPtr size = new UIntPtr( sizeof( int ) );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, 0, ref dtype, (IntPtr) ptr, ref size );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, ref dtype, (IntPtr) ptr, ref size );
|
||||
if ( result != NetConfigResult.OK )
|
||||
return 0;
|
||||
|
||||
@ -169,7 +169,7 @@ namespace Steamworks
|
||||
internal unsafe static bool SetConfigFloat( NetConfig type, float value )
|
||||
{
|
||||
float* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, 0, NetConfigType.Float, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Float, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static float GetConfigFloat( NetConfig type )
|
||||
@ -178,7 +178,7 @@ namespace Steamworks
|
||||
NetConfigType dtype = NetConfigType.Float;
|
||||
float* ptr = &value;
|
||||
UIntPtr size = new UIntPtr( sizeof( float ) );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, 0, ref dtype, (IntPtr)ptr, ref size );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, ref dtype, (IntPtr)ptr, ref size );
|
||||
if ( result != NetConfigResult.OK )
|
||||
return 0;
|
||||
|
||||
@ -191,7 +191,7 @@ namespace Steamworks
|
||||
|
||||
fixed ( byte* ptr = bytes )
|
||||
{
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, 0, NetConfigType.String, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.String, (IntPtr)ptr );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ internal class BaseType
|
||||
if ( basicType == "unsigned short" ) return new UInt16Type { NativeType = type, VarName = varname };
|
||||
|
||||
// DANGER DANGER Danger
|
||||
if ( basicType == "intptr_t" ) return new LongType { NativeType = type, VarName = varname };
|
||||
if ( basicType == "intptr_t" ) return new PointerType { NativeType = type, VarName = varname };
|
||||
if ( basicType == "size_t" ) return new UIntPtrType { NativeType = type, VarName = varname };
|
||||
|
||||
if ( basicType == "uint64" ) return new ULongType { NativeType = type, VarName = varname };
|
||||
|
Loading…
x
Reference in New Issue
Block a user