mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Fixed compiling with DISCORD_SDK=0
This commit is contained in:
parent
6f7d783602
commit
2f4008f9c9
4 changed files with 7 additions and 2 deletions
|
@ -22,7 +22,6 @@ struct DiscordApplication app = { 0 };
|
|||
bool gDiscordInitialized = false;
|
||||
bool gDiscordFailed = false;
|
||||
bool alreadyRun = false;
|
||||
bool gDiscordReconnecting = false;
|
||||
|
||||
static void discord_sdk_log_callback(UNUSED void* hook_data, enum EDiscordLogLevel level, const char* message) {
|
||||
LOGFILE_INFO(LFT_DISCORD, "callback (%d): %s", level, message);
|
||||
|
|
|
@ -29,7 +29,6 @@ void discord_fatal(int rc);
|
|||
extern struct NetworkSystem gNetworkSystemDiscord;
|
||||
extern bool gDiscordInitialized;
|
||||
extern bool gDiscordFailed;
|
||||
extern bool gDiscordReconnecting;
|
||||
|
||||
struct DiscordApplication {
|
||||
struct IDiscordCore* core;
|
||||
|
|
|
@ -57,6 +57,7 @@ u32 gNetworkAreaTimer = 0;
|
|||
void* gNetworkServerAddr = NULL;
|
||||
bool gNetworkSentJoin = false;
|
||||
u16 gNetworkRequestLocationTimer = 0;
|
||||
bool gDiscordReconnecting = false;
|
||||
|
||||
u8 gDebugPacketIdBuffer[256] = { 0xFF };
|
||||
u8 gDebugPacketSentBuffer[256] = { 0 };
|
||||
|
@ -409,9 +410,14 @@ void network_reconnect_begin(void) {
|
|||
}
|
||||
|
||||
sNetworkReconnectTimer = 2 * 30;
|
||||
|
||||
#ifdef DISCORD_SDK
|
||||
sNetworkReconnectType = (gNetworkSystem == &gNetworkSystemDiscord)
|
||||
? NS_DISCORD
|
||||
: NS_SOCKET;
|
||||
#else
|
||||
sNetworkReconnectType = NS_SOCKET;
|
||||
#endif
|
||||
|
||||
gDiscordReconnecting = true;
|
||||
network_shutdown(false, false, false);
|
||||
|
|
|
@ -89,6 +89,7 @@ extern u8 gDebugPacketIdBuffer[];
|
|||
extern u8 gDebugPacketSentBuffer[];
|
||||
extern u8 gDebugPacketOnBuffer;
|
||||
extern u32 gNetworkStartupTimer;
|
||||
extern bool gDiscordReconnecting;
|
||||
|
||||
// network.c
|
||||
void network_set_system(enum NetworkSystemType nsType);
|
||||
|
|
Loading…
Reference in a new issue