This commit is contained in:
twinaphex 2020-05-23 05:16:24 +02:00
parent 4a388668a3
commit c8940c130d
2 changed files with 3 additions and 15 deletions

View File

@ -15,19 +15,6 @@
#include <thread>
#endif
/* Forward declarations */
#if defined(__cplusplus) && !defined(CXX_BUILD)
extern "C" {
#endif
void Discord_Register(const char *a, const char *b);
void Discord_RegisterSteamGame(const char *a, const char *b);
#if defined(__cplusplus) && !defined(CXX_BUILD)
}
#endif
struct QueuedMessage
{
size_t length;

View File

@ -3,7 +3,8 @@
#include <atomic>
static const int RpcVersion = 1;
#define RPC_VERSION 1
static RpcConnection Instance;
/*static*/ RpcConnection* RpcConnection::Create(const char* applicationId)
@ -52,7 +53,7 @@ void RpcConnection::Open()
{
sendFrame.opcode = Opcode::Handshake;
sendFrame.length = (uint32_t)JsonWriteHandshakeObj(
sendFrame.message, sizeof(sendFrame.message), RpcVersion, appId);
sendFrame.message, sizeof(sendFrame.message), RPC_VERSION, appId);
if (connection->Write(&sendFrame,
sizeof(MessageFrameHeader) + sendFrame.length))