Fix DISCORD_SDK=0 building (#85)

Co-authored-by: anzz1 <>
This commit is contained in:
anzz1 2020-10-17 06:20:14 +03:00 committed by GitHub
parent b7f4ae735d
commit aacf81a6cd
1 changed files with 8 additions and 2 deletions

View File

@ -19,7 +19,10 @@
#include "audio/external.h" #include "audio/external.h"
#include "config.h" #include "config.h"
#include "pc/network/version.h" #include "pc/network/version.h"
#include "pc/network/discord/discord.h"
#ifdef DISCORD_SDK
#include "pc/network/discord/discord.h"
#endif
#define MAIN_MENU_HEADER_TEXT "SM64 COOP" #define MAIN_MENU_HEADER_TEXT "SM64 COOP"
@ -87,13 +90,16 @@ static void host_menu_draw_strings(void) {
char warning[128]; char warning[128];
snprintf(warning, 127, "Port forward '%d' in network router settings or use Hamachi.", configHostPort); snprintf(warning, 127, "Port forward '%d' in network router settings or use Hamachi.", configHostPort);
print_generic_ascii_string(0, 5, warning); print_generic_ascii_string(0, 5, warning);
} else if ((configNetworkSystem == 0) && gDiscordFailed) { }
#ifdef DISCORD_SDK
else if ((configNetworkSystem == 0) && gDiscordFailed) {
f32 red = (f32)fabs(sin(gGlobalTimer / 20.0f)); f32 red = (f32)fabs(sin(gGlobalTimer / 20.0f));
gDPSetEnvColor(gDisplayListHead++, 222, 222 * red, 222 * red, gMenuStringAlpha); gDPSetEnvColor(gDisplayListHead++, 222, 222 * red, 222 * red, gMenuStringAlpha);
char warning[128]; char warning[128];
snprintf(warning, 127, "Discord failed to initialize."); snprintf(warning, 127, "Discord failed to initialize.");
print_generic_ascii_string(0, 15, warning); print_generic_ascii_string(0, 15, warning);
} }
#endif
} }
static void host_menu_do_host(void) { static void host_menu_do_host(void) {