mirror of
https://git.suyu.dev/suyu/discord-rpc.git
synced 2026-01-06 06:28:54 +01:00
Dynamic Event Handler Registration (#135)
- Discord_RegisterHandlers() exported - C# wrapper updated - Dynamically sub/unsub to events - Better mutex locking, for safety!
This commit is contained in:
parent
7e5d57e6fd
commit
087282cd4b
5 changed files with 117 additions and 38 deletions
|
|
@ -87,6 +87,9 @@ public class DiscordRpc
|
|||
[DllImport("discord-rpc", EntryPoint = "Discord_Respond", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void Respond(string userId, Reply reply);
|
||||
|
||||
[DllImport("discord-rpc", EntryPoint = "Discord_UpdateHandlers", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UpdateHandlers(ref EventHandlers handlers);
|
||||
|
||||
public static void UpdatePresence(RichPresence presence)
|
||||
{
|
||||
var presencestruct = presence.GetStruct();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue