mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-23 12:04:04 +00:00
these need extern C
This commit is contained in:
parent
7c92afb392
commit
77b0e51691
2 changed files with 7 additions and 7 deletions
|
@ -257,7 +257,7 @@ void ConnectionWrite(const void* data, size_t length)
|
|||
|
||||
} // anonymous namespace
|
||||
|
||||
void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers)
|
||||
extern "C" void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers)
|
||||
{
|
||||
StringCopy(ApplicationId, applicationId, sizeof(ApplicationId));
|
||||
if (handlers) {
|
||||
|
@ -270,13 +270,13 @@ void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handler
|
|||
ConnectionOpen();
|
||||
}
|
||||
|
||||
void Discord_Shutdown()
|
||||
extern "C" void Discord_Shutdown()
|
||||
{
|
||||
Handlers = {};
|
||||
ConnectionClose();
|
||||
}
|
||||
|
||||
void Discord_UpdatePresence(const DiscordRichPresence* presence)
|
||||
extern "C" void Discord_UpdatePresence(const DiscordRichPresence* presence)
|
||||
{
|
||||
char* jsonWrite = Frame.message;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ static DiscordEventHandlers Handlers{};
|
|||
static bool wasJustConnected = false;
|
||||
static bool wasJustDisconnected = false;
|
||||
|
||||
void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers)
|
||||
extern "C" void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers)
|
||||
{
|
||||
StringCopy(ApplicationId, applicationId, sizeof(ApplicationId));
|
||||
if (handlers) {
|
||||
|
@ -25,14 +25,14 @@ void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handler
|
|||
MyConnection->Open();
|
||||
}
|
||||
|
||||
void Discord_Shutdown()
|
||||
extern "C" void Discord_Shutdown()
|
||||
{
|
||||
Handlers = {};
|
||||
MyConnection->Close();
|
||||
RpcConnection::Destroy(MyConnection);
|
||||
}
|
||||
|
||||
void Discord_UpdatePresence(const DiscordRichPresence* presence)
|
||||
extern "C" void Discord_UpdatePresence(const DiscordRichPresence* presence)
|
||||
{
|
||||
auto frame = MyConnection->GetNextFrame();
|
||||
char* jsonWrite = frame->message;
|
||||
|
@ -41,7 +41,7 @@ void Discord_UpdatePresence(const DiscordRichPresence* presence)
|
|||
MyConnection->WriteFrame(frame);
|
||||
}
|
||||
|
||||
void Discord_Update()
|
||||
extern "C" void Discord_Update()
|
||||
{
|
||||
// check for messages
|
||||
// todo
|
||||
|
|
Loading…
Reference in a new issue