Make io thread optional

This commit is contained in:
Chris Marsh
2017-07-18 09:47:33 -07:00
parent 6168a36201
commit 0d0485444d
4 changed files with 31 additions and 9 deletions

View File

@ -1,6 +1,8 @@
#pragma once
#include <stdint.h>
//#define DISCORD_DISABLE_IO_THREAD
#ifdef __cplusplus
extern "C" {
#endif
@ -36,7 +38,12 @@ void Discord_Shutdown();
void Discord_UpdatePresence(const DiscordRichPresence* presence);
/* checks for incoming messages, dispatches callbacks */
void Discord_Update();
void Discord_RunCallbacks();
/* If you disable the lib starting its own io thread, you'll need to call this from your own */
#ifdef DISCORD_DISABLE_IO_THREAD
void Discord_UpdateConnection();
#endif
#ifdef __cplusplus
} /* extern "C" */