Fix indentation

This commit is contained in:
james7132 2019-11-10 17:03:21 -08:00
parent 3e95d41692
commit 84063b674c

View File

@ -91,10 +91,10 @@ namespace Steamworks
var buffer = Helpers.TakeBuffer( (int) size ); var buffer = Helpers.TakeBuffer( (int) size );
fixed ( byte* p = buffer ) fixed ( byte* p = buffer )
{ {
SteamId steamid = 1; SteamId steamid = 1;
if ( !Internal.ReadP2PPacket( (IntPtr)p, (uint) buffer.Length, ref size, ref steamid, channel ) || size == 0 ) if ( !Internal.ReadP2PPacket( (IntPtr)p, (uint) buffer.Length, ref size, ref steamid, channel ) || size == 0 )
return null; return null;
var data = new byte[size]; var data = new byte[size];
Array.Copy( buffer, 0, data, 0, size ); Array.Copy( buffer, 0, data, 0, size );
@ -104,7 +104,7 @@ namespace Steamworks
SteamId = steamid, SteamId = steamid,
Data = data Data = data
}; };
} }
} }
/// <summary> /// <summary>
@ -112,9 +112,9 @@ namespace Steamworks
/// </summary> /// </summary>
public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref SteamId steamid, int channel = 0 ) public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref SteamId steamid, int channel = 0 )
{ {
fixed (byte* p = buffer) { fixed (byte* p = buffer) {
return Internal.ReadP2PPacket( (IntPtr)p, (uint)buffer.Length, ref size, ref steamid, channel ); return Internal.ReadP2PPacket( (IntPtr)p, (uint)buffer.Length, ref size, ref steamid, channel );
} }
} }
/// <summary> /// <summary>
@ -122,7 +122,7 @@ namespace Steamworks
/// </summary> /// </summary>
public unsafe static bool ReadP2PPacket( byte* buffer, uint cbuf, ref uint size, ref SteamId steamid, int channel = 0 ) public unsafe static bool ReadP2PPacket( byte* buffer, uint cbuf, ref uint size, ref SteamId steamid, int channel = 0 )
{ {
return Internal.ReadP2PPacket( (IntPtr)buffer, cbuf, ref size, ref steamid, channel ); return Internal.ReadP2PPacket( (IntPtr)buffer, cbuf, ref size, ref steamid, channel );
} }
/// <summary> /// <summary>
@ -147,9 +147,9 @@ namespace Steamworks
/// NOTE: The first packet send may be delayed as the NAT-traversal code runs. /// NOTE: The first packet send may be delayed as the NAT-traversal code runs.
/// </summary> /// </summary>
public static unsafe bool SendP2PPacket( SteamId steamid, byte* data, uint length, int nChannel = 1, P2PSend sendType = P2PSend.Reliable ) public static unsafe bool SendP2PPacket( SteamId steamid, byte* data, uint length, int nChannel = 1, P2PSend sendType = P2PSend.Reliable )
{ {
return Internal.SendP2PPacket( steamid, (IntPtr)data, (uint)length, (P2PSend)sendType, nChannel ); return Internal.SendP2PPacket( steamid, (IntPtr)data, (uint)length, (P2PSend)sendType, nChannel );
} }
} }
} }