mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Fix UNSTABLE_BRANCH checking
This commit is contained in:
parent
bc7ec31c02
commit
05fd683c64
2 changed files with 10 additions and 4 deletions
|
@ -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 a new issue