From 86ca320cb9280535b58340d59dd83c042f7e4399 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Fri, 13 Oct 2017 10:02:12 -0700 Subject: [PATCH] These should have been extern C. --- .../Assets/Resources/discord-rpc.dll | Bin 62464 -> 62464 bytes src/discord-rpc.cpp | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/button-clicker/Assets/Resources/discord-rpc.dll b/examples/button-clicker/Assets/Resources/discord-rpc.dll index afa55761197f57d3af8ec5041509ce022801baf2..283b98af2e1cf0a3bdafa6b6d70265ec63bc8da7 100644 GIT binary patch delta 36 mcmZp8!QAkId4m8W^Q8|DHVZQ@TmfcmU%6HU%t+ri(-Z(qUK0@j delta 36 mcmZp8!QAkId4m8WGw=8Nn}rz{t^hN(uUsnvW~A?%X$k-)LJ-sd diff --git a/src/discord-rpc.cpp b/src/discord-rpc.cpp index b5c112f..9d7fa0a 100644 --- a/src/discord-rpc.cpp +++ b/src/discord-rpc.cpp @@ -71,7 +71,7 @@ static void UpdateReconnectTime() } #ifdef DISCORD_DISABLE_IO_THREAD -DISCORD_EXPORT void Discord_UpdateConnection(void) +extern "C" DISCORD_EXPORT void Discord_UpdateConnection(void) #else static void Discord_UpdateConnection(void) #endif @@ -210,10 +210,10 @@ static bool RegisterForEvent(const char* evtName) return false; } -DISCORD_EXPORT void Discord_Initialize(const char* applicationId, - DiscordEventHandlers* handlers, - int autoRegister, - const char* optionalSteamId) +extern "C" DISCORD_EXPORT void Discord_Initialize(const char* applicationId, + DiscordEventHandlers* handlers, + int autoRegister, + const char* optionalSteamId) { if (autoRegister) { if (optionalSteamId && optionalSteamId[0]) { @@ -267,7 +267,7 @@ DISCORD_EXPORT void Discord_Initialize(const char* applicationId, #endif } -DISCORD_EXPORT void Discord_Shutdown() +extern "C" DISCORD_EXPORT void Discord_Shutdown() { if (!Connection) { return; @@ -285,7 +285,7 @@ DISCORD_EXPORT void Discord_Shutdown() RpcConnection::Destroy(Connection); } -DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence) +extern "C" DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence) { PresenceMutex.lock(); QueuedPresence.length = JsonWriteRichPresenceObj( @@ -294,7 +294,7 @@ DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence) SignalIOActivity(); } -DISCORD_EXPORT void Discord_Respond(const char* userId, /* DISCORD_REPLY_ */ int reply) +extern "C" DISCORD_EXPORT void Discord_Respond(const char* userId, /* DISCORD_REPLY_ */ int reply) { // if we are not connected, let's not batch up stale messages for later if (!Connection || !Connection->IsOpen()) { @@ -309,7 +309,7 @@ DISCORD_EXPORT void Discord_Respond(const char* userId, /* DISCORD_REPLY_ */ int } } -DISCORD_EXPORT void Discord_RunCallbacks() +extern "C" DISCORD_EXPORT void Discord_RunCallbacks() { // Note on some weirdness: internally we might connect, get other signals, disconnect any number // of times inbetween calls here. Externally, we want the sequence to seem sane, so any other