mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Discord: Translated some messages
This commit is contained in:
parent
9c22f6ed55
commit
35e1d0c841
2 changed files with 13 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
|||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
#include "DiscordIntegration.h"
|
||||
|
||||
#include "i18n/i18n.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
@ -13,10 +13,10 @@
|
|||
|
||||
#else
|
||||
|
||||
// TODO
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef ENABLE_DISCORD
|
||||
#include "ext/discord-rpc/include/discord_rpc.h"
|
||||
#endif
|
||||
|
@ -90,9 +90,12 @@ void Discord::SetPresenceGame(const char *gameTitle) {
|
|||
}
|
||||
|
||||
#ifdef ENABLE_DISCORD
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
DiscordRichPresence discordPresence{};
|
||||
discordPresence.state = gameTitle;
|
||||
discordPresence.details = "Playing";
|
||||
std::string details = sc->T("Playing");
|
||||
discordPresence.details = details.c_str();
|
||||
discordPresence.startTimestamp = time(0);
|
||||
#ifdef GOLD
|
||||
discordPresence.largeImageKey = "icon_gold_png";
|
||||
|
@ -112,8 +115,10 @@ void Discord::SetPresenceMenu() {
|
|||
}
|
||||
|
||||
#ifdef ENABLE_DISCORD
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
DiscordRichPresence discordPresence{};
|
||||
discordPresence.state = "In menu";
|
||||
discordPresence.state = sc->T("In menu");
|
||||
discordPresence.details = "";
|
||||
discordPresence.startTimestamp = time(0);
|
||||
#ifdef GOLD
|
||||
|
|
|
@ -187,6 +187,8 @@ void EmuScreen::bootGame(const std::string &filename) {
|
|||
if (!bootAllowStorage(filename))
|
||||
return;
|
||||
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
//pre-emptive loading of game specific config if possible, to get all the settings
|
||||
std::shared_ptr<GameInfo> info = g_gameInfoCache->GetInfo(nullptr, filename, 0);
|
||||
if (info && !info->id.empty()) {
|
||||
|
@ -196,7 +198,7 @@ void EmuScreen::bootGame(const std::string &filename) {
|
|||
|
||||
g_Discord.SetPresenceGame(info->GetTitle().c_str());
|
||||
} else {
|
||||
g_Discord.SetPresenceGame("(unknown)");
|
||||
g_Discord.SetPresenceGame(sc->T("Untitled PSP game"));
|
||||
}
|
||||
|
||||
invalid_ = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue