Fix compilation error with DISCORD_SDK=0

This commit is contained in:
Agent X 2024-01-06 09:41:13 -05:00
parent 236231ded1
commit ae58081f54
3 changed files with 12 additions and 0 deletions

View file

@ -7,11 +7,15 @@
#include "djui_panel_main.h"
#include "pc/network/network.h"
#include "pc/utils/misc.h"
#ifdef DISCORD_SDK
#include "pc/discord/discord.h"
#endif
#ifdef COOPNET
static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct DjuiBase* caller) {
#ifdef DISCORD_SDK
gDiscordInitialized = false;
#endif
if (gVersionText != NULL) {
djui_text_set_text(gVersionText, get_version_local());
}

View file

@ -14,12 +14,16 @@
#include "pc/configfile.h"
#include "pc/debuglog.h"
#include "macros.h"
#ifdef DISCORD_SDK
#include "pc/discord/discord.h"
#endif
static struct DjuiInputbox* sInputboxIp = NULL;
#ifndef COOPNET
static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct DjuiBase* caller) {
#ifdef DISCORD_SDK
gDiscordInitialized = false;
#endif
if (gVersionText != NULL) {
djui_text_set_text(gVersionText, get_version_local());
}

View file

@ -10,10 +10,14 @@
#include "pc/utils/misc.h"
#include "pc/configfile.h"
#include "game/hardcoded.h"
#ifdef DISCORD_SDK
#include "pc/discord/discord.h"
#endif
static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct DjuiBase* caller) {
#ifdef DISCORD_SDK
gDiscordInitialized = false;
#endif
if (gVersionText != NULL) {
djui_text_set_text(gVersionText, get_version_local());
}