Fix UNSTABLE_BRANCH checking
This commit is contained in:
parent
8d26400e84
commit
7cd4480fbc
|
@ -7,6 +7,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "macros.h"
|
||||
#include "src/game/characters.h"
|
||||
#include "pc/network/version.h"
|
||||
|
||||
// Certain functions are marked as having return values, but do not
|
||||
// actually return a value. This causes undefined behavior, which we'd rather
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "discord_network.h"
|
||||
#include "pc/debuglog.h"
|
||||
#include "menu/custom_menu_system.h"
|
||||
#include "pc/network/version.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <windows.h>
|
||||
|
@ -128,6 +129,14 @@ static bool ns_discord_initialize(enum NetworkType networkType) {
|
|||
#ifdef DEBUG
|
||||
set_instance_env_variable();
|
||||
#endif
|
||||
|
||||
#ifdef UNSTABLE_BRANCH
|
||||
if (networkType != NT_NONE) {
|
||||
// refuse to host on discord for unstable branch
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gDiscordInitialized) {
|
||||
// set up discord params
|
||||
struct DiscordCreateParams params;
|
||||
|
@ -142,10 +151,6 @@ static bool ns_discord_initialize(enum NetworkType networkType) {
|
|||
int rc = DiscordCreate(DISCORD_VERSION, ¶ms, &app.core);
|
||||
gDiscordFailed = false;
|
||||
if (networkType != NT_NONE) {
|
||||
#ifdef UNSTABLE_BRANCH
|
||||
// refuse to host on discord for unstable branch
|
||||
exit(1);
|
||||
#endif
|
||||
DISCORD_REQUIRE(rc);
|
||||
} else if (rc) {
|
||||
LOG_ERROR("DiscordCreate failed: %d", rc);
|
||||
|
|
Loading…
Reference in New Issue