mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Fixed early outing with enum for no reason
This commit is contained in:
parent
1e1eb00e04
commit
18262fd4f2
@ -98,7 +98,6 @@ public GameSearchErrorCode_t RetrieveConnectionDetails( CSteamID steamIDHost /*c
|
|||||||
System.Text.StringBuilder pchConnectionDetails_sb = Helpers.TakeStringBuilder();
|
System.Text.StringBuilder pchConnectionDetails_sb = Helpers.TakeStringBuilder();
|
||||||
int cubConnectionDetails = 4096;
|
int cubConnectionDetails = 4096;
|
||||||
bSuccess = platform.ISteamGameSearch_RetrieveConnectionDetails( steamIDHost.Value, pchConnectionDetails_sb, cubConnectionDetails );
|
bSuccess = platform.ISteamGameSearch_RetrieveConnectionDetails( steamIDHost.Value, pchConnectionDetails_sb, cubConnectionDetails );
|
||||||
if ( !bSuccess ) return bSuccess;
|
|
||||||
pchConnectionDetails = pchConnectionDetails_sb.ToString();
|
pchConnectionDetails = pchConnectionDetails_sb.ToString();
|
||||||
return bSuccess;
|
return bSuccess;
|
||||||
}
|
}
|
||||||
|
@ -349,8 +349,9 @@ private void Detect_StringFetch( List<Argument> argList, List<Argument> callargs
|
|||||||
var num = argList[i+1];
|
var num = argList[i+1];
|
||||||
|
|
||||||
var IntReturn = ReturnType.Contains( "int" );
|
var IntReturn = ReturnType.Contains( "int" );
|
||||||
|
var intReturn = ReturnType.Contains( "int" );
|
||||||
|
|
||||||
if ( num.ManagedType.Trim( '*' ) != "int" && num.ManagedType.Trim( '*' ) != "uint" ) continue;
|
if ( num.ManagedType.Trim( '*' ) != "int" && num.ManagedType.Trim( '*' ) != "uint" ) continue;
|
||||||
|
|
||||||
argList.Remove( num );
|
argList.Remove( num );
|
||||||
|
|
||||||
@ -382,8 +383,11 @@ private void Detect_StringFetch( List<Argument> argList, List<Argument> callargs
|
|||||||
if ( ReturnString ) AfterLines.Insert( 0, $"return {chr.Name}_sb.ToString();" );
|
if ( ReturnString ) AfterLines.Insert( 0, $"return {chr.Name}_sb.ToString();" );
|
||||||
else AfterLines.Insert( 0, $"{chr.Name} = {chr.Name}_sb.ToString();" );
|
else AfterLines.Insert( 0, $"{chr.Name} = {chr.Name}_sb.ToString();" );
|
||||||
|
|
||||||
|
if ( enumReturn )
|
||||||
if ( IntReturn )
|
{
|
||||||
|
// Fuck all
|
||||||
|
}
|
||||||
|
else if ( intReturn )
|
||||||
{
|
{
|
||||||
if ( ReturnString ) AfterLines.Insert( 0, "if ( bSuccess <= 0 ) return null;" );
|
if ( ReturnString ) AfterLines.Insert( 0, "if ( bSuccess <= 0 ) return null;" );
|
||||||
else AfterLines.Insert( 0, "if ( bSuccess <= 0 ) return bSuccess;" );
|
else AfterLines.Insert( 0, "if ( bSuccess <= 0 ) return bSuccess;" );
|
||||||
|
Loading…
Reference in New Issue
Block a user