mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 20:15:17 +00:00
Restore functionality of network_discord_id_from_local_index(0)
This commit is contained in:
parent
e8d9ef247f
commit
0e7b86017e
3 changed files with 16 additions and 1 deletions
|
@ -149,6 +149,10 @@ static void discord_initialize(void) {
|
|||
LOG_INFO("initialized");
|
||||
}
|
||||
|
||||
u64 discord_get_user_id(void) {
|
||||
return app.userId;
|
||||
}
|
||||
|
||||
void discord_update(void) {
|
||||
if (!sDiscordInitialized) {
|
||||
discord_initialize();
|
||||
|
|
|
@ -34,3 +34,4 @@ void discord_fatal(int rc);
|
|||
void discord_activity_update_check(void);
|
||||
void discord_activity_update(void);
|
||||
struct IDiscordActivityEvents* discord_activity_initialize(void);
|
||||
u64 discord_get_user_id(void);
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
#include "types.h"
|
||||
#ifdef DISCORD_SDK
|
||||
#include "pc/discord/discord.h"
|
||||
#endif
|
||||
|
||||
char* network_discord_id_from_local_index(UNUSED u8 localIndex) {
|
||||
char* network_discord_id_from_local_index(u8 localIndex) {
|
||||
#ifdef DISCORD_SDK
|
||||
static char sDiscordId[64] = "";
|
||||
if (localIndex == 0) {
|
||||
snprintf(sDiscordId, 64, "%" PRIu64 "", (uint64_t)discord_get_user_id());
|
||||
return sDiscordId;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue