mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 23:28:11 +03:00
Handle struct returns differently on 32bit windows too
This commit is contained in:
parent
a24ae4bac5
commit
7fbc333547
@ -311,7 +311,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetAppOwner( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetAppOwner( IntPtr self );
|
||||
@ -321,7 +321,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetAppOwner()
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetAppOwner( Self, ref retVal );
|
||||
return retVal;
|
||||
|
@ -394,7 +394,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetClanByIndex( IntPtr self, ref SteamId retVal, int iClan );
|
||||
#else
|
||||
private delegate SteamId FGetClanByIndex( IntPtr self, int iClan );
|
||||
@ -404,7 +404,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetClanByIndex( int iClan )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetClanByIndex( Self, ref retVal, iClan );
|
||||
return retVal;
|
||||
@ -473,7 +473,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetFriendFromSourceByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDSource, int iFriend );
|
||||
#else
|
||||
private delegate SteamId FGetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
|
||||
@ -483,7 +483,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetFriendFromSourceByIndex( Self, ref retVal, steamIDSource, iFriend );
|
||||
return retVal;
|
||||
@ -639,7 +639,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetClanOwner( IntPtr self, ref SteamId retVal, SteamId steamIDClan );
|
||||
#else
|
||||
private delegate SteamId FGetClanOwner( IntPtr self, SteamId steamIDClan );
|
||||
@ -649,7 +649,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetClanOwner( SteamId steamIDClan )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetClanOwner( Self, ref retVal, steamIDClan );
|
||||
return retVal;
|
||||
@ -671,7 +671,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetClanOfficerByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iOfficer );
|
||||
#else
|
||||
private delegate SteamId FGetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
|
||||
@ -681,7 +681,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetClanOfficerByIndex( Self, ref retVal, steamIDClan, iOfficer );
|
||||
return retVal;
|
||||
@ -795,7 +795,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetCoplayFriend( IntPtr self, ref SteamId retVal, int iCoplayFriend );
|
||||
#else
|
||||
private delegate SteamId FGetCoplayFriend( IntPtr self, int iCoplayFriend );
|
||||
@ -805,7 +805,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetCoplayFriend( int iCoplayFriend )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetCoplayFriend( Self, ref retVal, iCoplayFriend );
|
||||
return retVal;
|
||||
@ -872,7 +872,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetChatMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iUser );
|
||||
#else
|
||||
private delegate SteamId FGetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
|
||||
@ -882,7 +882,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetChatMemberByIndex( Self, ref retVal, steamIDClan, iUser );
|
||||
return retVal;
|
||||
|
@ -223,7 +223,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetSteamID( IntPtr self );
|
||||
@ -233,7 +233,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetSteamID( Self, ref retVal );
|
||||
return retVal;
|
||||
@ -400,7 +400,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
|
||||
@ -410,7 +410,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId CreateUnauthenticatedUserConnection()
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_CreateUnauthenticatedUserConnection( Self, ref retVal );
|
||||
return retVal;
|
||||
|
@ -222,7 +222,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetDigitalActionData( IntPtr self, ref DigitalState retVal, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
#else
|
||||
private delegate DigitalState FGetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
@ -232,7 +232,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( DigitalState );
|
||||
_GetDigitalActionData( Self, ref retVal, inputHandle, digitalActionHandle );
|
||||
return retVal;
|
||||
@ -265,7 +265,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetAnalogActionData( IntPtr self, ref AnalogState retVal, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
#else
|
||||
private delegate AnalogState FGetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
@ -275,7 +275,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( AnalogState );
|
||||
_GetAnalogActionData( Self, ref retVal, inputHandle, analogActionHandle );
|
||||
return retVal;
|
||||
@ -332,7 +332,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetMotionData( IntPtr self, ref MotionState retVal, InputHandle_t inputHandle );
|
||||
#else
|
||||
private delegate MotionState FGetMotionData( IntPtr self, InputHandle_t inputHandle );
|
||||
@ -342,7 +342,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal MotionState GetMotionData( InputHandle_t inputHandle )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( MotionState );
|
||||
_GetMotionData( Self, ref retVal, inputHandle );
|
||||
return retVal;
|
||||
|
@ -232,7 +232,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyByIndex( IntPtr self, ref SteamId retVal, int iLobby );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyByIndex( IntPtr self, int iLobby );
|
||||
@ -242,7 +242,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetLobbyByIndex( int iLobby )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyByIndex( Self, ref retVal, iLobby );
|
||||
return retVal;
|
||||
@ -309,7 +309,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDLobby, int iMember );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
|
||||
@ -319,7 +319,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetLobbyMemberByIndex( SteamId steamIDLobby, int iMember )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyMemberByIndex( Self, ref retVal, steamIDLobby, iMember );
|
||||
return retVal;
|
||||
@ -517,7 +517,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyOwner( IntPtr self, ref SteamId retVal, SteamId steamIDLobby );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyOwner( IntPtr self, SteamId steamIDLobby );
|
||||
@ -527,7 +527,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetLobbyOwner( SteamId steamIDLobby )
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyOwner( Self, ref retVal, steamIDLobby );
|
||||
return retVal;
|
||||
|
@ -105,7 +105,7 @@ namespace Steamworks
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetSteamID( IntPtr self );
|
||||
@ -115,7 +115,7 @@ namespace Steamworks
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
#if PLATFORM_WIN64
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetSteamID( Self, ref retVal );
|
||||
return retVal;
|
||||
|
@ -209,7 +209,7 @@ namespace Generator
|
||||
|
||||
if ( returnType.IsReturnedWeird )
|
||||
{
|
||||
WriteLine( "#if PLATFORM_WIN64" );
|
||||
WriteLine( "#if PLATFORM_WIN" );
|
||||
WriteLine( $"private delegate void F{func.Name}( IntPtr self, ref {returnType.TypeName} retVal, {delegateargstr} );".Replace( " retVal, )", " retVal )" ) );
|
||||
WriteLine( "#else" );
|
||||
}
|
||||
@ -232,7 +232,7 @@ namespace Generator
|
||||
|
||||
if ( returnType.IsReturnedWeird )
|
||||
{
|
||||
WriteLine( "#if PLATFORM_WIN64" );
|
||||
WriteLine( "#if PLATFORM_WIN" );
|
||||
{
|
||||
WriteLine( $"var retVal = default( {returnType.TypeName} );" );
|
||||
WriteLine( $"_{func.Name}( Self, ref retVal, {callargs} );".Replace( ", );", " );" ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user