mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 08:45:45 -04:00
Achievements: Backports from PCSX2
This commit is contained in:
@ -159,16 +159,16 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
|
||||
|
||||
void AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Cheevos", "NotificationsDuration",
|
||||
Settings::DEFAULT_ACHIEVEMENT_NOTIFICATION_TIME);
|
||||
m_ui.achievementNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
const int duration =
|
||||
m_dialog->getEffectiveIntValue("Cheevos", "NotificationsDuration", Settings::DEFAULT_ACHIEVEMENT_NOTIFICATION_TIME);
|
||||
m_ui.achievementNotificationsDurationLabel->setText(tr("%n seconds", nullptr, duration));
|
||||
}
|
||||
|
||||
void AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Cheevos", "LeaderboardsDuration",
|
||||
Settings::DEFAULT_ACHIEVEMENT_NOTIFICATION_TIME);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
const int duration =
|
||||
m_dialog->getEffectiveIntValue("Cheevos", "LeaderboardsDuration", Settings::DEFAULT_LEADERBOARD_NOTIFICATION_TIME);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setText(tr("%n seconds", nullptr, duration));
|
||||
}
|
||||
|
||||
void AchievementSettingsWidget::updateLoginState()
|
||||
|
@ -2657,10 +2657,9 @@ void MainWindow::onAchievementsLoginSucceeded(const QString& display_name, quint
|
||||
m_ui.statusBar->showMessage(message);
|
||||
}
|
||||
|
||||
void MainWindow::onAchievementsChallengeModeChanged()
|
||||
void MainWindow::onAchievementsChallengeModeChanged(bool enabled)
|
||||
{
|
||||
const bool active = Achievements::IsHardcoreModeActive();
|
||||
if (active)
|
||||
if (enabled)
|
||||
{
|
||||
if (m_cheat_manager_dialog)
|
||||
{
|
||||
@ -2677,7 +2676,7 @@ void MainWindow::onAchievementsChallengeModeChanged()
|
||||
}
|
||||
}
|
||||
|
||||
updateEmulationActions(false, System::IsValid(), active);
|
||||
updateEmulationActions(false, System::IsValid(), enabled);
|
||||
}
|
||||
|
||||
void MainWindow::onToolsMemoryCardEditorTriggered()
|
||||
|
@ -134,7 +134,7 @@ private Q_SLOTS:
|
||||
void onAchievementsLoginRequested(Achievements::LoginRequestReason reason);
|
||||
void onAchievementsLoginSucceeded(const QString& display_name, quint32 points, quint32 sc_points,
|
||||
quint32 unread_messages);
|
||||
void onAchievementsChallengeModeChanged();
|
||||
void onAchievementsChallengeModeChanged(bool enabled);
|
||||
void onApplicationStateChanged(Qt::ApplicationState state);
|
||||
|
||||
void onStartFileActionTriggered();
|
||||
|
@ -1231,7 +1231,7 @@ void Host::OnAchievementsRefreshed()
|
||||
|
||||
const std::string& rich_presence_string = Achievements::GetRichPresenceString();
|
||||
if (Achievements::HasRichPresence() && !rich_presence_string.empty())
|
||||
game_info.append(QString::fromStdString(rich_presence_string));
|
||||
game_info.append(QString::fromStdString(StringUtil::Ellipsise(rich_presence_string, 128)));
|
||||
else
|
||||
game_info.append(qApp->translate("EmuThread", "Rich presence inactive or unsupported."));
|
||||
}
|
||||
@ -1243,9 +1243,9 @@ void Host::OnAchievementsRefreshed()
|
||||
emit g_emu_thread->achievementsRefreshed(game_id, game_info);
|
||||
}
|
||||
|
||||
void Host::OnAchievementsHardcoreModeChanged()
|
||||
void Host::OnAchievementsHardcoreModeChanged(bool enabled)
|
||||
{
|
||||
emit g_emu_thread->achievementsChallengeModeChanged();
|
||||
emit g_emu_thread->achievementsChallengeModeChanged(enabled);
|
||||
}
|
||||
|
||||
void EmuThread::doBackgroundControllerPoll()
|
||||
|
@ -144,7 +144,7 @@ Q_SIGNALS:
|
||||
void achievementsLoginSucceeded(const QString& display_name, quint32 points, quint32 sc_points,
|
||||
quint32 unread_messages);
|
||||
void achievementsRefreshed(quint32 id, const QString& game_info_string);
|
||||
void achievementsChallengeModeChanged();
|
||||
void achievementsChallengeModeChanged(bool enabled);
|
||||
void cheatEnabled(quint32 index, bool enabled);
|
||||
|
||||
public Q_SLOTS:
|
||||
|
Reference in New Issue
Block a user