Merge pull request #21246 from hrydgard/more-fixes

Reflect Gold status in Discord Rich Presence
This commit is contained in:
Henrik Rydgård
2026-02-12 19:04:38 +01:00
committed by GitHub
4 changed files with 18 additions and 8 deletions
+8 -1
View File
@@ -32,6 +32,7 @@
Discord g_Discord;
static const char *ppsspp_app_id = "423397985041383434";
static const char *ppsspp_app_id_gold = "1471464214710190152";
#ifdef ENABLE_DISCORD
// No context argument? What?
@@ -65,7 +66,13 @@ void Discord::Init() {
#ifdef ENABLE_DISCORD
DiscordEventHandlers eventHandlers{};
eventHandlers.errored = &handleDiscordError;
Discord_Initialize(ppsspp_app_id, &eventHandlers, 0, nullptr);
const char *appId = ppsspp_app_id;
if (System_GetPropertyBool(SYSPROP_APP_GOLD)) {
appId = ppsspp_app_id_gold;
}
Discord_Initialize(appId, &eventHandlers, 0, nullptr);
INFO_LOG(Log::System, "Discord connection initialized");
#endif
+2 -1
View File
@@ -189,8 +189,9 @@ void DriverManagerScreen::CreateDriverTab(UI::ViewGroup *drivers) {
void DriverManagerScreen::OnCustomDriverChange(UI::EventParams &e) {
auto di = GetI18NCategory(I18NCat::DIALOG);
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
screenManager()->push(new PromptScreen(gamePath_, di->T("Changing this setting requires PPSSPP to restart."), di->T("Restart"), di->T("Cancel"), [=](bool yes) {
screenManager()->push(new UI::MessagePopupScreen(gr->T("Drivers"), di->T("Changing this setting requires PPSSPP to restart."), di->T("Restart"), di->T("Cancel"), [=](bool yes) {
if (yes) {
INFO_LOG(Log::G3D, "Switching driver to '%s'", e.s.c_str());
g_Config.sCustomDriver = e.s;
+1
View File
@@ -1457,6 +1457,7 @@ void EmuScreen::update() {
errLoadingFile.append("\n");
errLoadingFile.append(errorMessage_);
// Can't really use the MessagePopupScreen here because we don't have a good looking background.
screenManager()->push(new PromptScreen(gamePath_, errLoadingFile, di->T("OK"), ""));
errorMessage_.clear();
quit_ = true;
+7 -6
View File
@@ -1012,14 +1012,14 @@ MacAddressChooser::MacAddressChooser(RequesterToken token, Path gamePath, std::s
std::string_view warningMessage = n->T("ChangeMacSaveWarning", "Some games verify the MAC address when loading savedata, so this may break old saves.");
std::string combined = g_Config.sMACAddress + "\n\n" + std::string(confirmMessage) + "\n\n" + std::string(warningMessage);
auto confirmScreen = new PromptScreen(
gamePath,
auto confirmScreen = new MessagePopupScreen(
title,
combined, di->T("Yes"), di->T("No"),
[&](bool success) {
[](bool success) {
if (success) {
g_Config.sMACAddress = CreateRandMAC();
}}
);
}
});
screenManager->push(confirmScreen);
});
}
@@ -1820,8 +1820,9 @@ void GameSettingsScreen::OnRestoreDefaultSettings(UI::EventParams &e) {
if (g_Config.IsGameSpecific()) {
auto dev = GetI18NCategory(I18NCat::DEVELOPER);
auto di = GetI18NCategory(I18NCat::DIALOG);
auto sy = GetI18NCategory(I18NCat::SYSTEM);
screenManager()->push(
new PromptScreen(gamePath_, dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"),
new UI::MessagePopupScreen(sy->T("Restore Default Settings"), dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"),
di->T("OK"), di->T("Cancel"), [this](bool yes) { CallbackRestoreDefaults(yes); }));
} else {
std::string_view title = sy->T("Restore Default Settings");