mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Remove Achievements/Leaderboards/RP Enabled settings
The RetroAchievements client object now handles these three settings as a singular "spectator" mode that will be added in a future commit.
This commit is contained in:
parent
3bf5b8e610
commit
9a40ec06b5
@ -652,7 +652,7 @@ void AchievementManager::DisplayWelcomeMessage()
|
|||||||
fmt::format("Hardcore mode is {}", rc_client_get_hardcore_enabled(m_client) ? "ON" : "OFF"),
|
fmt::format("Hardcore mode is {}", rc_client_get_hardcore_enabled(m_client) ? "ON" : "OFF"),
|
||||||
OSD::Duration::VERY_LONG, color);
|
OSD::Duration::VERY_LONG, color);
|
||||||
OSD::AddMessage(fmt::format("Leaderboard submissions are {}",
|
OSD::AddMessage(fmt::format("Leaderboard submissions are {}",
|
||||||
Config::Get(Config::RA_LEADERBOARDS_ENABLED) ? "ON" : "OFF"),
|
rc_client_get_hardcore_enabled(m_client) ? "ON" : "OFF"),
|
||||||
OSD::Duration::VERY_LONG, color);
|
OSD::Duration::VERY_LONG, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,12 +15,6 @@ const Info<bool> RA_ENABLED{{System::Achievements, "Achievements", "Enabled"}, f
|
|||||||
const Info<std::string> RA_HOST_URL{{System::Achievements, "Achievements", "HostUrl"}, ""};
|
const Info<std::string> RA_HOST_URL{{System::Achievements, "Achievements", "HostUrl"}, ""};
|
||||||
const Info<std::string> RA_USERNAME{{System::Achievements, "Achievements", "Username"}, ""};
|
const Info<std::string> RA_USERNAME{{System::Achievements, "Achievements", "Username"}, ""};
|
||||||
const Info<std::string> RA_API_TOKEN{{System::Achievements, "Achievements", "ApiToken"}, ""};
|
const Info<std::string> RA_API_TOKEN{{System::Achievements, "Achievements", "ApiToken"}, ""};
|
||||||
const Info<bool> RA_ACHIEVEMENTS_ENABLED{
|
|
||||||
{System::Achievements, "Achievements", "AchievementsEnabled"}, false};
|
|
||||||
const Info<bool> RA_LEADERBOARDS_ENABLED{
|
|
||||||
{System::Achievements, "Achievements", "LeaderboardsEnabled"}, false};
|
|
||||||
const Info<bool> RA_RICH_PRESENCE_ENABLED{
|
|
||||||
{System::Achievements, "Achievements", "RichPresenceEnabled"}, false};
|
|
||||||
const Info<bool> RA_HARDCORE_ENABLED{{System::Achievements, "Achievements", "HardcoreEnabled"},
|
const Info<bool> RA_HARDCORE_ENABLED{{System::Achievements, "Achievements", "HardcoreEnabled"},
|
||||||
false};
|
false};
|
||||||
const Info<bool> RA_PROGRESS_ENABLED{{System::Achievements, "Achievements", "ProgressEnabled"},
|
const Info<bool> RA_PROGRESS_ENABLED{{System::Achievements, "Achievements", "ProgressEnabled"},
|
||||||
|
@ -14,9 +14,6 @@ extern const Info<bool> RA_ENABLED;
|
|||||||
extern const Info<std::string> RA_USERNAME;
|
extern const Info<std::string> RA_USERNAME;
|
||||||
extern const Info<std::string> RA_HOST_URL;
|
extern const Info<std::string> RA_HOST_URL;
|
||||||
extern const Info<std::string> RA_API_TOKEN;
|
extern const Info<std::string> RA_API_TOKEN;
|
||||||
extern const Info<bool> RA_ACHIEVEMENTS_ENABLED;
|
|
||||||
extern const Info<bool> RA_LEADERBOARDS_ENABLED;
|
|
||||||
extern const Info<bool> RA_RICH_PRESENCE_ENABLED;
|
|
||||||
extern const Info<bool> RA_HARDCORE_ENABLED;
|
extern const Info<bool> RA_HARDCORE_ENABLED;
|
||||||
extern const Info<bool> RA_PROGRESS_ENABLED;
|
extern const Info<bool> RA_PROGRESS_ENABLED;
|
||||||
extern const Info<bool> RA_BADGES_ENABLED;
|
extern const Info<bool> RA_BADGES_ENABLED;
|
||||||
|
@ -127,8 +127,7 @@ void AchievementHeaderWidget::UpdateData()
|
|||||||
m_game_progress->setVisible(true);
|
m_game_progress->setVisible(true);
|
||||||
m_game_progress->setValue(game_summary.num_unlocked_achievements);
|
m_game_progress->setValue(game_summary.num_unlocked_achievements);
|
||||||
m_rich_presence->setText(QString::fromUtf8(instance.GetRichPresence().data()));
|
m_rich_presence->setText(QString::fromUtf8(instance.GetRichPresence().data()));
|
||||||
if (!m_rich_presence->isVisible())
|
m_rich_presence->setVisible(true);
|
||||||
m_rich_presence->setVisible(Config::Get(Config::RA_RICH_PRESENCE_ENABLED));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -61,18 +61,6 @@ void AchievementSettingsWidget::CreateLayout()
|
|||||||
m_common_login_failed = new QLabel(tr("Login Failed"));
|
m_common_login_failed = new QLabel(tr("Login Failed"));
|
||||||
m_common_login_failed->setStyleSheet(QStringLiteral("QLabel { color : red; }"));
|
m_common_login_failed->setStyleSheet(QStringLiteral("QLabel { color : red; }"));
|
||||||
m_common_login_failed->setVisible(false);
|
m_common_login_failed->setVisible(false);
|
||||||
m_common_achievements_enabled_input = new ToolTipCheckBox(tr("Enable Achievements"));
|
|
||||||
m_common_achievements_enabled_input->SetDescription(tr("Enable unlocking achievements.<br>"));
|
|
||||||
m_common_leaderboards_enabled_input = new ToolTipCheckBox(tr("Enable Leaderboards"));
|
|
||||||
m_common_leaderboards_enabled_input->SetDescription(
|
|
||||||
tr("Enable competing in RetroAchievements leaderboards.<br><br>Hardcore Mode must be enabled "
|
|
||||||
"to use."));
|
|
||||||
m_common_rich_presence_enabled_input = new ToolTipCheckBox(tr("Enable Rich Presence"));
|
|
||||||
m_common_rich_presence_enabled_input->SetDescription(
|
|
||||||
tr("Enable detailed rich presence on the RetroAchievements website.<br><br>This provides a "
|
|
||||||
"detailed description of what the player is doing in game to the website. If this is "
|
|
||||||
"disabled, the website will only report what game is being played.<br><br>This has no "
|
|
||||||
"bearing on Discord rich presence."));
|
|
||||||
m_common_unofficial_enabled_input = new ToolTipCheckBox(tr("Enable Unofficial Achievements"));
|
m_common_unofficial_enabled_input = new ToolTipCheckBox(tr("Enable Unofficial Achievements"));
|
||||||
m_common_unofficial_enabled_input->SetDescription(
|
m_common_unofficial_enabled_input->SetDescription(
|
||||||
tr("Enable unlocking unofficial achievements as well as official "
|
tr("Enable unlocking unofficial achievements as well as official "
|
||||||
@ -117,9 +105,6 @@ void AchievementSettingsWidget::CreateLayout()
|
|||||||
m_common_layout->addWidget(m_common_login_button);
|
m_common_layout->addWidget(m_common_login_button);
|
||||||
m_common_layout->addWidget(m_common_logout_button);
|
m_common_layout->addWidget(m_common_logout_button);
|
||||||
m_common_layout->addWidget(m_common_login_failed);
|
m_common_layout->addWidget(m_common_login_failed);
|
||||||
m_common_layout->addWidget(m_common_achievements_enabled_input);
|
|
||||||
m_common_layout->addWidget(m_common_leaderboards_enabled_input);
|
|
||||||
m_common_layout->addWidget(m_common_rich_presence_enabled_input);
|
|
||||||
m_common_layout->addWidget(m_common_hardcore_enabled_input);
|
m_common_layout->addWidget(m_common_hardcore_enabled_input);
|
||||||
m_common_layout->addWidget(m_common_progress_enabled_input);
|
m_common_layout->addWidget(m_common_progress_enabled_input);
|
||||||
m_common_layout->addWidget(m_common_badges_enabled_input);
|
m_common_layout->addWidget(m_common_badges_enabled_input);
|
||||||
@ -136,12 +121,6 @@ void AchievementSettingsWidget::ConnectWidgets()
|
|||||||
&AchievementSettingsWidget::ToggleRAIntegration);
|
&AchievementSettingsWidget::ToggleRAIntegration);
|
||||||
connect(m_common_login_button, &QPushButton::pressed, this, &AchievementSettingsWidget::Login);
|
connect(m_common_login_button, &QPushButton::pressed, this, &AchievementSettingsWidget::Login);
|
||||||
connect(m_common_logout_button, &QPushButton::pressed, this, &AchievementSettingsWidget::Logout);
|
connect(m_common_logout_button, &QPushButton::pressed, this, &AchievementSettingsWidget::Logout);
|
||||||
connect(m_common_achievements_enabled_input, &QCheckBox::toggled, this,
|
|
||||||
&AchievementSettingsWidget::ToggleAchievements);
|
|
||||||
connect(m_common_leaderboards_enabled_input, &QCheckBox::toggled, this,
|
|
||||||
&AchievementSettingsWidget::ToggleLeaderboards);
|
|
||||||
connect(m_common_rich_presence_enabled_input, &QCheckBox::toggled, this,
|
|
||||||
&AchievementSettingsWidget::ToggleRichPresence);
|
|
||||||
connect(m_common_hardcore_enabled_input, &QCheckBox::toggled, this,
|
connect(m_common_hardcore_enabled_input, &QCheckBox::toggled, this,
|
||||||
&AchievementSettingsWidget::ToggleHardcore);
|
&AchievementSettingsWidget::ToggleHardcore);
|
||||||
connect(m_common_progress_enabled_input, &QCheckBox::toggled, this,
|
connect(m_common_progress_enabled_input, &QCheckBox::toggled, this,
|
||||||
@ -165,7 +144,6 @@ void AchievementSettingsWidget::OnControllerInterfaceConfigure()
|
|||||||
void AchievementSettingsWidget::LoadSettings()
|
void AchievementSettingsWidget::LoadSettings()
|
||||||
{
|
{
|
||||||
bool enabled = Config::Get(Config::RA_ENABLED);
|
bool enabled = Config::Get(Config::RA_ENABLED);
|
||||||
bool achievements_enabled = Config::Get(Config::RA_ACHIEVEMENTS_ENABLED);
|
|
||||||
bool hardcore_enabled = Config::Get(Config::RA_HARDCORE_ENABLED);
|
bool hardcore_enabled = Config::Get(Config::RA_HARDCORE_ENABLED);
|
||||||
bool logged_out = Config::Get(Config::RA_API_TOKEN).empty();
|
bool logged_out = Config::Get(Config::RA_API_TOKEN).empty();
|
||||||
std::string username = Config::Get(Config::RA_USERNAME);
|
std::string username = Config::Get(Config::RA_USERNAME);
|
||||||
@ -184,17 +162,6 @@ void AchievementSettingsWidget::LoadSettings()
|
|||||||
SignalBlocking(m_common_logout_button)->setVisible(!logged_out);
|
SignalBlocking(m_common_logout_button)->setVisible(!logged_out);
|
||||||
SignalBlocking(m_common_logout_button)->setEnabled(enabled);
|
SignalBlocking(m_common_logout_button)->setEnabled(enabled);
|
||||||
|
|
||||||
SignalBlocking(m_common_achievements_enabled_input)->setChecked(achievements_enabled);
|
|
||||||
SignalBlocking(m_common_achievements_enabled_input)->setEnabled(enabled);
|
|
||||||
|
|
||||||
SignalBlocking(m_common_leaderboards_enabled_input)
|
|
||||||
->setChecked(Config::Get(Config::RA_LEADERBOARDS_ENABLED));
|
|
||||||
SignalBlocking(m_common_leaderboards_enabled_input)->setEnabled(enabled && hardcore_enabled);
|
|
||||||
|
|
||||||
SignalBlocking(m_common_rich_presence_enabled_input)
|
|
||||||
->setChecked(Config::Get(Config::RA_RICH_PRESENCE_ENABLED));
|
|
||||||
SignalBlocking(m_common_rich_presence_enabled_input)->setEnabled(enabled);
|
|
||||||
|
|
||||||
SignalBlocking(m_common_hardcore_enabled_input)
|
SignalBlocking(m_common_hardcore_enabled_input)
|
||||||
->setChecked(Config::Get(Config::RA_HARDCORE_ENABLED));
|
->setChecked(Config::Get(Config::RA_HARDCORE_ENABLED));
|
||||||
auto& system = Core::System::GetInstance();
|
auto& system = Core::System::GetInstance();
|
||||||
@ -205,17 +172,17 @@ void AchievementSettingsWidget::LoadSettings()
|
|||||||
|
|
||||||
SignalBlocking(m_common_progress_enabled_input)
|
SignalBlocking(m_common_progress_enabled_input)
|
||||||
->setChecked(Config::Get(Config::RA_PROGRESS_ENABLED));
|
->setChecked(Config::Get(Config::RA_PROGRESS_ENABLED));
|
||||||
SignalBlocking(m_common_progress_enabled_input)->setEnabled(enabled && achievements_enabled);
|
SignalBlocking(m_common_progress_enabled_input)->setEnabled(enabled);
|
||||||
|
|
||||||
SignalBlocking(m_common_badges_enabled_input)->setChecked(Config::Get(Config::RA_BADGES_ENABLED));
|
SignalBlocking(m_common_badges_enabled_input)->setChecked(Config::Get(Config::RA_BADGES_ENABLED));
|
||||||
SignalBlocking(m_common_badges_enabled_input)->setEnabled(enabled);
|
SignalBlocking(m_common_badges_enabled_input)->setEnabled(enabled);
|
||||||
|
|
||||||
SignalBlocking(m_common_unofficial_enabled_input)
|
SignalBlocking(m_common_unofficial_enabled_input)
|
||||||
->setChecked(Config::Get(Config::RA_UNOFFICIAL_ENABLED));
|
->setChecked(Config::Get(Config::RA_UNOFFICIAL_ENABLED));
|
||||||
SignalBlocking(m_common_unofficial_enabled_input)->setEnabled(enabled && achievements_enabled);
|
SignalBlocking(m_common_unofficial_enabled_input)->setEnabled(enabled);
|
||||||
|
|
||||||
SignalBlocking(m_common_encore_enabled_input)->setChecked(Config::Get(Config::RA_ENCORE_ENABLED));
|
SignalBlocking(m_common_encore_enabled_input)->setChecked(Config::Get(Config::RA_ENCORE_ENABLED));
|
||||||
SignalBlocking(m_common_encore_enabled_input)->setEnabled(enabled && achievements_enabled);
|
SignalBlocking(m_common_encore_enabled_input)->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AchievementSettingsWidget::SaveSettings()
|
void AchievementSettingsWidget::SaveSettings()
|
||||||
@ -223,12 +190,6 @@ void AchievementSettingsWidget::SaveSettings()
|
|||||||
Config::ConfigChangeCallbackGuard config_guard;
|
Config::ConfigChangeCallbackGuard config_guard;
|
||||||
|
|
||||||
Config::SetBaseOrCurrent(Config::RA_ENABLED, m_common_integration_enabled_input->isChecked());
|
Config::SetBaseOrCurrent(Config::RA_ENABLED, m_common_integration_enabled_input->isChecked());
|
||||||
Config::SetBaseOrCurrent(Config::RA_ACHIEVEMENTS_ENABLED,
|
|
||||||
m_common_achievements_enabled_input->isChecked());
|
|
||||||
Config::SetBaseOrCurrent(Config::RA_LEADERBOARDS_ENABLED,
|
|
||||||
m_common_leaderboards_enabled_input->isChecked());
|
|
||||||
Config::SetBaseOrCurrent(Config::RA_RICH_PRESENCE_ENABLED,
|
|
||||||
m_common_rich_presence_enabled_input->isChecked());
|
|
||||||
Config::SetBaseOrCurrent(Config::RA_HARDCORE_ENABLED,
|
Config::SetBaseOrCurrent(Config::RA_HARDCORE_ENABLED,
|
||||||
m_common_hardcore_enabled_input->isChecked());
|
m_common_hardcore_enabled_input->isChecked());
|
||||||
Config::SetBaseOrCurrent(Config::RA_PROGRESS_ENABLED,
|
Config::SetBaseOrCurrent(Config::RA_PROGRESS_ENABLED,
|
||||||
@ -265,21 +226,6 @@ void AchievementSettingsWidget::Logout()
|
|||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AchievementSettingsWidget::ToggleAchievements()
|
|
||||||
{
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AchievementSettingsWidget::ToggleLeaderboards()
|
|
||||||
{
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AchievementSettingsWidget::ToggleRichPresence()
|
|
||||||
{
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AchievementSettingsWidget::ToggleHardcore()
|
void AchievementSettingsWidget::ToggleHardcore()
|
||||||
{
|
{
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
|
@ -32,9 +32,6 @@ private:
|
|||||||
void ToggleRAIntegration();
|
void ToggleRAIntegration();
|
||||||
void Login();
|
void Login();
|
||||||
void Logout();
|
void Logout();
|
||||||
void ToggleAchievements();
|
|
||||||
void ToggleLeaderboards();
|
|
||||||
void ToggleRichPresence();
|
|
||||||
void ToggleHardcore();
|
void ToggleHardcore();
|
||||||
void ToggleProgress();
|
void ToggleProgress();
|
||||||
void ToggleBadges();
|
void ToggleBadges();
|
||||||
@ -51,9 +48,6 @@ private:
|
|||||||
QLineEdit* m_common_password_input;
|
QLineEdit* m_common_password_input;
|
||||||
QPushButton* m_common_login_button;
|
QPushButton* m_common_login_button;
|
||||||
QPushButton* m_common_logout_button;
|
QPushButton* m_common_logout_button;
|
||||||
ToolTipCheckBox* m_common_achievements_enabled_input;
|
|
||||||
ToolTipCheckBox* m_common_leaderboards_enabled_input;
|
|
||||||
ToolTipCheckBox* m_common_rich_presence_enabled_input;
|
|
||||||
ToolTipCheckBox* m_common_hardcore_enabled_input;
|
ToolTipCheckBox* m_common_hardcore_enabled_input;
|
||||||
ToolTipCheckBox* m_common_progress_enabled_input;
|
ToolTipCheckBox* m_common_progress_enabled_input;
|
||||||
ToolTipCheckBox* m_common_badges_enabled_input;
|
ToolTipCheckBox* m_common_badges_enabled_input;
|
||||||
|
Loading…
Reference in New Issue
Block a user