Update DiscordRPC.cpp
Fix title case, add spacing, add newline, rom > ROM
This commit is contained in:
parent
2f82144606
commit
7d8316b0da
|
@ -5,7 +5,7 @@
|
||||||
#define UNIX_TIME_START 0x019DB1DED53E8000
|
#define UNIX_TIME_START 0x019DB1DED53E8000
|
||||||
#define TICKS_PER_SECOND 10000000
|
#define TICKS_PER_SECOND 10000000
|
||||||
|
|
||||||
//Discord Project64 App ID
|
// Discord Project64 app ID
|
||||||
#define PJ64_DISCORD_APPID "704794684387491891"
|
#define PJ64_DISCORD_APPID "704794684387491891"
|
||||||
|
|
||||||
void CDiscord::Init()
|
void CDiscord::Init()
|
||||||
|
@ -39,13 +39,13 @@ static stdstr GetTitle()
|
||||||
void CDiscord::Update(bool bHaveGame)
|
void CDiscord::Update(bool bHaveGame)
|
||||||
{
|
{
|
||||||
// Variables we use later
|
// Variables we use later
|
||||||
//title uses the Rdb_GoodName to display a proper game name over DiscordRPC
|
// Title uses the Rdb_GoodName to display a proper game name over DiscordRPC
|
||||||
//artwork uses the Header of the rom to easily add game pictures through the discord developer panel using the ID above
|
// Artwork uses the header of the ROM to easily add game images through the Discord developer panel using the ID above
|
||||||
stdstr title = bHaveGame ? GetTitle() : "";
|
stdstr title = bHaveGame ? GetTitle() : "";
|
||||||
stdstr artwork = bHaveGame ? g_Settings->LoadStringVal(Rdb_RPCKey) : "";
|
stdstr artwork = bHaveGame ? g_Settings->LoadStringVal(Rdb_RPCKey) : "";
|
||||||
|
|
||||||
//Load Game Into DiscordRPC
|
//Load game into DiscordRPC
|
||||||
DiscordRichPresence discordPresence = {}; //activates DiscordRPC
|
DiscordRichPresence discordPresence = {}; // Activates DiscordRPC
|
||||||
if (artwork.empty())
|
if (artwork.empty())
|
||||||
{
|
{
|
||||||
discordPresence.largeImageKey = "pj64_icon";
|
discordPresence.largeImageKey = "pj64_icon";
|
||||||
|
@ -61,7 +61,7 @@ void CDiscord::Update(bool bHaveGame)
|
||||||
discordPresence.details = title.empty() ? "Not in-game" : title.c_str();
|
discordPresence.details = title.empty() ? "Not in-game" : title.c_str();
|
||||||
discordPresence.startTimestamp = Timestamp();
|
discordPresence.startTimestamp = Timestamp();
|
||||||
|
|
||||||
Discord_UpdatePresence(&discordPresence); //end DiscordRPC
|
Discord_UpdatePresence(&discordPresence); // End DiscordRPC
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t CDiscord::Timestamp()
|
int64_t CDiscord::Timestamp()
|
||||||
|
|
Loading…
Reference in New Issue