From 0d24fabdf4b4dd980d0fd9e55f8222e3f8c1c426 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Thu, 30 Nov 2017 12:23:40 -0800 Subject: [PATCH] Fix param type --- examples/button-clicker/Assets/DiscordController.cs | 2 +- examples/button-clicker/Assets/DiscordRpc.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/button-clicker/Assets/DiscordController.cs b/examples/button-clicker/Assets/DiscordController.cs index 98f584c..b9f0429 100644 --- a/examples/button-clicker/Assets/DiscordController.cs +++ b/examples/button-clicker/Assets/DiscordController.cs @@ -68,7 +68,7 @@ public class DiscordController : MonoBehaviour onSpectate.Invoke(secret); } - public void RequestCallback(DiscordRpc.JoinRequest request) + public void RequestCallback(ref DiscordRpc.JoinRequest request) { ++callbackCalls; Debug.Log(string.Format("Discord: join request {0}#{1}: {2}", request.username, request.discriminator, request.userId)); diff --git a/examples/button-clicker/Assets/DiscordRpc.cs b/examples/button-clicker/Assets/DiscordRpc.cs index 541f853..d7570e0 100644 --- a/examples/button-clicker/Assets/DiscordRpc.cs +++ b/examples/button-clicker/Assets/DiscordRpc.cs @@ -18,7 +18,7 @@ public class DiscordRpc public delegate void SpectateCallback(string secret); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void RequestCallback(JoinRequest request); + public delegate void RequestCallback(ref JoinRequest request); public struct EventHandlers {