Different variable name

This commit is contained in:
msciotti 2018-11-08 10:20:18 -08:00
parent 30c93579d5
commit a7c81fcc80
No known key found for this signature in database
GPG Key ID: 40FADA25CF0EAD84

View File

@ -7,27 +7,27 @@ using AOT;
public class DiscordRpc public class DiscordRpc
{ {
[MonoPInvokeCallback(typeof(OnReadyInfo))] [MonoPInvokeCallback(typeof(OnReadyInfo))]
public static void ReadyCallback(ref DiscordUser user){} public static void ReadyCallback(ref DiscordUser connectedUser) { }
public delegate void OnReadyInfo(ref DiscordUser connectedUser); public delegate void OnReadyInfo(ref DiscordUser connectedUser);
[MonoPInvokeCallback(typeof(OnDisconnectedInfo))] [MonoPInvokeCallback(typeof(OnDisconnectedInfo))]
public static void DisconnectedCallback(int errorCode, string message){} public static void DisconnectedCallback(int errorCode, string message) { }
public delegate void OnDisconnectedInfo(int errorCode, string message); public delegate void OnDisconnectedInfo(int errorCode, string message);
[MonoPInvokeCallback(typeof(OnErrorInfo))] [MonoPInvokeCallback(typeof(OnErrorInfo))]
public static void ErrorCallback(int errorCode, string message){} public static void ErrorCallback(int errorCode, string message) { }
public delegate void OnErrorInfo(int errorCode, string message); public delegate void OnErrorInfo(int errorCode, string message);
[MonoPInvokeCallback(typeof(OnJoinInfo))] [MonoPInvokeCallback(typeof(OnJoinInfo))]
public static void JoinCallback(string secret){} public static void JoinCallback(string secret) { }
public delegate void OnJoinInfo(string secret); public delegate void OnJoinInfo(string secret);
[MonoPInvokeCallback(typeof(OnSpectateInfo))] [MonoPInvokeCallback(typeof(OnSpectateInfo))]
public static void SpectateCallback(string secret){} public static void SpectateCallback(string secret) { }
public delegate void OnSpectateInfo(string secret); public delegate void OnSpectateInfo(string secret);
[MonoPInvokeCallback(typeof(OnRequestInfo))] [MonoPInvokeCallback(typeof(OnRequestInfo))]
public static void RequestCallback(ref DiscordUser request){} public static void RequestCallback(ref DiscordUser request) { }
public delegate void OnRequestInfo(ref DiscordUser request); public delegate void OnRequestInfo(ref DiscordUser request);
public struct EventHandlers public struct EventHandlers
@ -167,7 +167,7 @@ public class DiscordRpc
var buffer = Marshal.AllocHGlobal(convbytecnt + 1); var buffer = Marshal.AllocHGlobal(convbytecnt + 1);
for (int i = 0; i < convbytecnt + 1; i++) for (int i = 0; i < convbytecnt + 1; i++)
{ {
Marshal.WriteByte(buffer, i , 0); Marshal.WriteByte(buffer, i, 0);
} }
_buffers.Add(buffer); _buffers.Add(buffer);
Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt); Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt);