Compare commits

...

3 Commits

Author SHA1 Message Date
KamFretoZ
a755131488 Qt: Enable Savestate Selector UI by default
This should've been enabled by default but I've missed the part that actually enables it.
2025-04-10 19:00:46 +02:00
KamFretoZ
648ff65a76 Rcheevos: Add customizable sound effects 2025-04-10 19:00:46 +02:00
Sean
854d1c0a1a Debugger: Add column titles to Disassembly view.
Added new column title row to the "Disassembly" view in the debugger. Title row is non-selectable (single/double/right clicking on row do nothing) and branch lines do not get drawn on the title row. Format of title row was based on similar, existing title row on the VU0f tab in the "Registers" view.
2025-04-10 18:59:49 +02:00
11 changed files with 686 additions and 294 deletions

View File

@@ -355,37 +355,48 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
// Get the row height
m_rowHeight = fm.height() + 2;
// Find the amount of visible rows
m_visibleRows = h / m_rowHeight;
// Find the amount of visible disassembly rows. Minus 1 to not count column title row.
m_visibleRows = h / m_rowHeight - 1;
m_disassemblyManager.analyze(m_visibleStart, m_disassemblyManager.getNthNextAddress(m_visibleStart, m_visibleRows) - m_visibleStart);
// Draw the rows
const u32 curPC = cpu().getPC(); // Get the PC here, because it'll change when we are drawing and make it seem like there are two PCs
// Format and draw title line on first row
const QString titleLineString = GetDisassemblyTitleLine();
const QColor titleLineColor = GetDisassemblyTitleLineColor();
painter.fillRect(0, 0 * m_rowHeight, w, m_rowHeight, titleLineColor);
painter.drawText(2, 0 * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, titleLineString);
// Prepare to draw the disassembly rows
bool inSelectionBlock = false;
bool alternate = m_visibleStart % 8;
const u32 curPC = cpu().getPC(); // Get the PC here, because it'll change when we are drawing and make it seem like there are two PCs
// Draw visible disassembly rows
for (u32 i = 0; i <= m_visibleRows; i++)
{
// Address of instruction being displayed on row
const u32 rowAddress = (i * 4) + m_visibleStart;
// Row backgrounds
// Row will be drawn at row index+1 to offset past title row
const u32 rowIndex = (i + 1) * m_rowHeight;
// Row backgrounds
if (inSelectionBlock || (m_selectedAddressStart <= rowAddress && rowAddress <= m_selectedAddressEnd))
{
painter.fillRect(0, i * m_rowHeight, w, m_rowHeight, this->palette().highlight());
painter.fillRect(0, rowIndex, w, m_rowHeight, this->palette().highlight());
inSelectionBlock = m_selectedAddressEnd != rowAddress;
}
else
{
painter.fillRect(0, i * m_rowHeight, w, m_rowHeight, alternate ? this->palette().base() : this->palette().alternateBase());
painter.fillRect(0, rowIndex, w, m_rowHeight, alternate ? this->palette().base() : this->palette().alternateBase());
}
// Row text
painter.setPen(GetAddressFunctionColor(rowAddress));
QString lineString = DisassemblyStringFromAddress(rowAddress, painter.font(), curPC, rowAddress == m_selectedAddressStart);
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, lineString);
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, lineString);
// Breakpoint marker
bool enabled;
@@ -394,11 +405,11 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
if (enabled)
{
painter.setPen(Qt::green);
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u25A0");
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, "\u25A0");
}
else
{
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u2612");
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, "\u2612");
}
}
alternate = !alternate;
@@ -435,9 +446,10 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
// Explaination
// ((branchLine.first - m_visibleStart) -> Find the amount of bytes from the top of the view
// / 4 -> Convert that into rowss in instructions
// + 1 -> Offset 1 to account for column title row
// * m_rowHeight -> convert that into rows in pixels
// + (m_rowHeight / 2) -> Add half a row in pixels to center the arrow
top = (((branchLine.first - m_visibleStart) / 4) * m_rowHeight) + (m_rowHeight / 2);
top = (((branchLine.first - m_visibleStart) / 4 + 1) * m_rowHeight) + (m_rowHeight / 2);
}
if (branchLine.second < m_visibleStart)
@@ -450,7 +462,7 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
}
else
{
bottom = (((branchLine.second - m_visibleStart) / 4) * m_rowHeight) + (m_rowHeight / 2);
bottom = (((branchLine.second - m_visibleStart) / 4 + 1) * m_rowHeight) + (m_rowHeight / 2);
}
branchCount++;
@@ -467,7 +479,8 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
if (top < 0) // first is not visible, but second is
{
painter.drawLine(x - 2, bottom, x + 2, bottom);
painter.drawLine(x + 2, bottom, x + 2, 0);
// Draw to first visible disassembly row so branch line is not drawn on title line
painter.drawLine(x + 2, bottom, x + 2, m_rowHeight);
if (branchLine.type == LINE_DOWN)
{
@@ -515,40 +528,56 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
void DisassemblyWidget::mousePressEvent(QMouseEvent* event)
{
const u32 selectedAddress = (static_cast<int>(event->position().y()) / m_rowHeight * 4) + m_visibleStart;
if (event->buttons() & Qt::LeftButton)
// Calculate index of row that was clicked
const u32 selectedRowIndex = static_cast<int>(event->position().y()) / m_rowHeight;
// Only process if a row other than the column title row was clicked
if (selectedRowIndex > 0)
{
if (event->modifiers() & Qt::ShiftModifier)
// Calculate address of selected row. Index minus one for title row.
const u32 selectedAddress = ((selectedRowIndex - 1) * 4) + m_visibleStart;
if (event->buttons() & Qt::LeftButton)
{
if (selectedAddress < m_selectedAddressStart)
if (event->modifiers() & Qt::ShiftModifier)
{
if (selectedAddress < m_selectedAddressStart)
{
m_selectedAddressStart = selectedAddress;
}
else if (selectedAddress > m_visibleStart)
{
m_selectedAddressEnd = selectedAddress;
}
}
else
{
m_selectedAddressStart = selectedAddress;
}
else if (selectedAddress > m_visibleStart)
{
m_selectedAddressEnd = selectedAddress;
}
}
else
else if (event->buttons() & Qt::RightButton)
{
m_selectedAddressStart = selectedAddress;
m_selectedAddressEnd = selectedAddress;
if (m_selectedAddressStart == m_selectedAddressEnd)
{
m_selectedAddressStart = selectedAddress;
m_selectedAddressEnd = selectedAddress;
}
}
this->repaint();
}
else if (event->buttons() & Qt::RightButton)
{
if (m_selectedAddressStart == m_selectedAddressEnd)
{
m_selectedAddressStart = selectedAddress;
m_selectedAddressEnd = selectedAddress;
}
}
this->repaint();
}
void DisassemblyWidget::mouseDoubleClickEvent(QMouseEvent* event)
{
toggleBreakpoint((static_cast<int>(event->position().y()) / m_rowHeight * 4) + m_visibleStart);
// Calculate index of row that was double clicked
const u32 selectedRowIndex = static_cast<int>(event->position().y()) / m_rowHeight;
// Only process if a row other than the column title row was double clicked
if (selectedRowIndex > 0)
{
// Calculate address of selected row. Index minus one for title row.
toggleBreakpoint(((selectedRowIndex - 1) * 4) + m_visibleStart);
}
}
void DisassemblyWidget::wheelEvent(QWheelEvent* event)
@@ -641,6 +670,10 @@ void DisassemblyWidget::openContextMenu(QPoint pos)
if (!cpu().isAlive())
return;
// Dont open context menu when used on column title row
if (pos.y() / m_rowHeight == 0)
return;
QMenu* menu = new QMenu(this);
menu->setAttribute(Qt::WA_DeleteOnClose);
@@ -743,6 +776,51 @@ void DisassemblyWidget::openContextMenu(QPoint pos)
menu->popup(this->mapToGlobal(pos));
}
QString DisassemblyWidget::GetDisassemblyTitleLine()
{
// Disassembly column title line based on format created by DisassemblyStringFromAddress()
QString title_line_string;
// Determine layout of disassembly row. Layout depends on user setting "Show Instruction Bytes".
const bool show_instruction_bytes = m_showInstructionBytes && cpu().isAlive();
if (show_instruction_bytes)
{
title_line_string = QCoreApplication::translate("DisassemblyWidgetColumnTitle", " %1 %2 %3 %4");
}
else
{
title_line_string = QCoreApplication::translate("DisassemblyWidgetColumnTitle", " %1 %2 %3");
}
// First 2 chars in disassembly row is always for non-returning functions (NR)
// Do not display column title for this field.
title_line_string = title_line_string.arg(" ");
// Second column title is always address of instruction
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyWidgetColumnTitle", "Location"));
// If user specified to "Show Instruction Bytes", third column is opcode + args
if (show_instruction_bytes)
{
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyWidgetColumnTitle", "Bytes "));
}
// Last column title is always disassembled instruction
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyWidgetColumnTitle", "Instruction"));
return title_line_string;
}
QColor DisassemblyWidget::GetDisassemblyTitleLineColor()
{
// Determine color of column title line. Based on QFusionStyle.
QColor title_line_color = this->palette().button().color();
const int title_line_color_val = qGray(title_line_color.rgb());
title_line_color = title_line_color.lighter(100 + qMax(1, (180 - title_line_color_val) / 6));
title_line_color.setHsv(title_line_color.hue(), title_line_color.saturation() * 0.75, title_line_color.value());
return title_line_color.lighter(104);
}
inline QString DisassemblyWidget::DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected)
{
DisassemblyLineInfo line;

View File

@@ -80,6 +80,8 @@ private:
bool m_goToProgramCounterOnPause = true;
DisassemblyManager m_disassemblyManager;
QString GetDisassemblyTitleLine();
QColor GetDisassemblyTitleLineColor();
inline QString DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected);
QColor GetAddressFunctionColor(u32 address);
enum class SelectionInfo

View File

@@ -1261,6 +1261,102 @@ namespace SettingWidgetBinder
widget->connect(widget, &QLineEdit::editingFinished, widget, std::move(value_changed));
}
static inline void BindWidgetToFileSetting(SettingsInterface* sif, QLineEdit* widget, QAbstractButton* browse_button,
QAbstractButton* open_button, QAbstractButton* reset_button, std::string section, std::string key, std::string default_value,
const char* filter, bool allow_pergame = false, bool use_relative = true)
{
using Accessor = SettingAccessor<QLineEdit>;
std::string current_path(Host::GetBaseStringSettingValue(section.c_str(), key.c_str(), default_value.c_str()));
if (current_path.empty())
current_path = default_value;
else if (use_relative && !Path::IsAbsolute(current_path))
current_path = Path::Canonicalize(Path::Combine(EmuFolders::DataRoot, current_path));
const QString value(QString::fromStdString(current_path));
Accessor::setStringValue(widget, value);
if (!allow_pergame)
{
widget->setEnabled(false);
if (browse_button)
browse_button->setEnabled(false);
if (reset_button)
reset_button->setEnabled(false);
return;
}
auto value_changed = [widget, section = std::move(section), key = std::move(key), default_value, use_relative]() {
const std::string new_value(widget->text().toStdString());
if (!new_value.empty())
{
if (use_relative)
{
const std::string relative_path(Path::MakeRelative(new_value, EmuFolders::DataRoot));
Host::SetBaseStringSettingValue(section.c_str(), key.c_str(), relative_path.c_str());
}
else
{
Host::SetBaseStringSettingValue(section.c_str(), key.c_str(), new_value.c_str());
}
if (!FileSystem::FileExists(new_value.c_str()))
{
QMessageBox::critical(QtUtils::GetRootWidget(widget), qApp->translate("SettingWidgetBinder", "Error"),
qApp->translate("SettingWidgetBinder", "File cannot be found."));
}
Host::CommitBaseSettingChanges();
return;
}
else
{
QMessageBox::critical(QtUtils::GetRootWidget(widget), qApp->translate("SettingWidgetBinder", "Error"),
qApp->translate("SettingWidgetBinder", "File path cannot be empty."));
}
// reset to old value
std::string current_path(Host::GetBaseStringSettingValue(section.c_str(), key.c_str(), default_value.c_str()));
if (current_path.empty())
current_path = default_value;
else if (use_relative && !Path::IsAbsolute(current_path))
current_path = Path::Canonicalize(Path::Combine(EmuFolders::DataRoot, current_path));
widget->setText(QString::fromStdString(current_path));
};
if (browse_button)
{
QObject::connect(browse_button, &QAbstractButton::clicked, browse_button, [widget, key, value_changed, filter]() {
const QString path(QDir::toNativeSeparators(QFileDialog::getOpenFileName(QtUtils::GetRootWidget(widget),
qApp->translate("SettingWidgetBinder", "Select File"), QString(), filter)));
if (path.isEmpty())
return;
widget->setText(path);
value_changed();
});
}
if (open_button)
{
QObject::connect(open_button, &QAbstractButton::clicked, open_button, [widget]() {
QString path(Accessor::getStringValue(widget));
if (!path.isEmpty())
QtUtils::OpenURL(QtUtils::GetRootWidget(widget), QUrl::fromLocalFile(path));
});
}
if (reset_button)
{
QObject::connect(
reset_button, &QAbstractButton::clicked, reset_button, [widget, default_value = std::move(default_value), value_changed]() {
widget->setText(QString::fromStdString(default_value));
value_changed();
});
}
widget->connect(widget, &QLineEdit::editingFinished, widget, std::move(value_changed));
}
// No need to pass a section or key since this is only used once and has six keys associated with it
static inline void BindWidgetToDateTimeSetting(SettingsInterface* sif, QDateTimeEdit* widget, std::string section)
{

View File

@@ -16,6 +16,8 @@
#include <QtCore/QDateTime>
#include <QtWidgets/QMessageBox>
const char* AUDIO_FILE_FILTER = QT_TRANSLATE_NOOP("MainWindow", "Audio Files (*.wav)");
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
@@ -29,6 +31,9 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.achievementNotifications, "Achievements", "Notifications", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.leaderboardNotifications, "Achievements", "LeaderboardNotifications", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.soundEffects, "Achievements", "SoundEffects", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.notificationSound, "Achievements", "InfoSound", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.unlockSound, "Achievements", "UnlockSound", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.lbSound, "Achievements", "LBSubmitSound", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.overlays, "Achievements", "Overlays", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.encoreMode, "Achievements", "EncoreMode", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.spectatorMode, "Achievements", "SpectatorMode", false);
@@ -36,11 +41,16 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.achievementNotificationsDuration, "Achievements", "NotificationsDuration", Pcsx2Config::AchievementsOptions::DEFAULT_NOTIFICATION_DURATION);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.leaderboardNotificationsDuration, "Achievements", "LeaderboardsDuration", Pcsx2Config::AchievementsOptions::DEFAULT_LEADERBOARD_DURATION);
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.notificationSoundPath, m_ui.notificationSoundBrowse, m_ui.notificationSoundOpen, m_ui.notificationSoundReset, "Achievements", "InfoSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_INFO_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.unlockSoundPath, m_ui.unlockSoundBrowse, m_ui.unlockSoundOpen, m_ui.unlockSoundReset, "Achievements", "UnlockSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_UNLOCK_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.lbSoundPath, m_ui.lbSoundBrowse, m_ui.lbSoundOpen, m_ui.lbSoundReset, "Achievements", "LBSubmitSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_LBSUBMIT_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
dialog->registerWidgetHelp(m_ui.enable, tr("Enable Achievements"), tr("Unchecked"), tr("When enabled and logged in, PCSX2 will scan for achievements on startup."));
dialog->registerWidgetHelp(m_ui.hardcoreMode, tr("Enable Hardcore Mode"), tr("Unchecked"), tr("\"Challenge\" mode for achievements, including leaderboard tracking. Disables save state, cheats, and slowdown functions."));
dialog->registerWidgetHelp(m_ui.achievementNotifications, tr("Show Achievement Notifications"), tr("Checked"), tr("Displays popup messages on events such as achievement unlocks and game completion."));
dialog->registerWidgetHelp(m_ui.leaderboardNotifications, tr("Show Leaderboard Notifications"), tr("Checked"), tr("Displays popup messages when starting, submitting, or failing a leaderboard challenge."));
dialog->registerWidgetHelp(m_ui.soundEffects, tr("Enable Sound Effects"), tr("Checked"), tr("Plays sound effects for events such as achievement unlocks and leaderboard submissions."));
dialog->registerWidgetHelp(m_ui.soundEffectsBox, tr("Custom Sound Effect"), tr("Any"), tr("Customize the sound effect that are played whenever you received a notification, earned an achievement or submitted an entry to the leaderboard."));
dialog->registerWidgetHelp(m_ui.overlays, tr("Enable In-Game Overlays"), tr("Checked"), tr("Shows icons in the lower-right corner of the screen when a challenge/primed achievement is active."));
dialog->registerWidgetHelp(m_ui.encoreMode, tr("Enable Encore Mode"), tr("Unchecked"),tr("When enabled, each session will behave as if no achievements have been unlocked."));
dialog->registerWidgetHelp(m_ui.spectatorMode, tr("Enable Spectator Mode"), tr("Unchecked"), tr("When enabled, PCSX2 will assume all achievements are locked and not send any unlock notifications to the server."));
@@ -51,6 +61,10 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::onHardcoreModeStateChanged);
connect(m_ui.achievementNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.leaderboardNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.soundEffects, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.notificationSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.unlockSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.lbSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged);
@@ -73,6 +87,11 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
m_ui.verticalLayout->removeWidget(m_ui.loginBox);
m_ui.loginBox->deleteLater();
m_ui.loginBox = nullptr;
// sound effects
m_ui.verticalLayout->removeWidget(m_ui.soundEffectsBox);
m_ui.soundEffectsBox->deleteLater();
m_ui.soundEffectsBox = nullptr;
}
updateEnableState();
@@ -87,6 +106,10 @@ void AchievementSettingsWidget::updateEnableState()
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
const bool notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true);
const bool lb_notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
const bool sound = m_dialog->getEffectiveBoolValue("Achievements", "SoundEffects", true);
const bool info = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "InfoSound", true);
const bool unlock = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "UnlockSound", true);
const bool lbsound = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
m_ui.hardcoreMode->setEnabled(enabled);
m_ui.achievementNotifications->setEnabled(enabled);
m_ui.leaderboardNotifications->setEnabled(enabled);
@@ -94,6 +117,21 @@ void AchievementSettingsWidget::updateEnableState()
m_ui.achievementNotificationsDurationLabel->setEnabled(notifications);
m_ui.leaderboardNotificationsDuration->setEnabled(lb_notifications);
m_ui.leaderboardNotificationsDurationLabel->setEnabled(lb_notifications);
m_ui.notificationSoundPath->setEnabled(info);
m_ui.notificationSoundBrowse->setEnabled(info);
m_ui.notificationSoundOpen->setEnabled(info);
m_ui.notificationSoundReset->setEnabled(info);
m_ui.notificationSound->setEnabled(enabled);
m_ui.unlockSoundPath->setEnabled(unlock);
m_ui.unlockSoundBrowse->setEnabled(unlock);
m_ui.unlockSoundOpen->setEnabled(unlock);
m_ui.unlockSoundReset->setEnabled(unlock);
m_ui.unlockSound->setEnabled(enabled);
m_ui.lbSoundPath->setEnabled(lbsound);
m_ui.lbSoundOpen->setEnabled(lbsound);
m_ui.lbSoundBrowse->setEnabled(lbsound);
m_ui.lbSoundReset->setEnabled(lbsound);
m_ui.lbSound->setEnabled(enabled);
m_ui.soundEffects->setEnabled(enabled);
m_ui.overlays->setEnabled(enabled);
m_ui.encoreMode->setEnabled(enabled);

View File

@@ -24,256 +24,364 @@
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Settings</string>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QCheckBox" name="spectatorMode">
<property name="text">
<string>Enable Spectator Mode</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enable">
<property name="text">
<string>Enable Achievements</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="unofficialAchievements">
<property name="text">
<string>Test Unofficial Achievements</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="encoreMode">
<property name="text">
<string>Enable Encore Mode</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="hardcoreMode">
<property name="text">
<string>Enable Hardcore Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="notificationBox">
<property name="title">
<string>Notifications</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,1">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="1,0">
<item>
<widget class="QSlider" name="achievementNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="achievementNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="achievementNotifications">
<property name="text">
<string>Show Achievement Notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0">
<item>
<widget class="QSlider" name="leaderboardNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leaderboardNotifications">
<property name="text">
<string>Show Leaderboard Notifications</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="soundEffects">
<property name="text">
<string>Enable Sound Effects</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="overlays">
<property name="text">
<string>Enable In-Game Overlays</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="loginBox">
<property name="title">
<string>Account</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<item>
<widget class="QLabel" name="loginStatus">
<property name="text">
<string>Username:
<widget class="QWidget" name="scrollAreaAchievements">
<property name="geometry">
<rect>
<x>0</x>
<y>-2</y>
<width>655</width>
<height>739</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="settingsBox">
<property name="title">
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="0">
<widget class="QCheckBox" name="unofficialAchievements">
<property name="text">
<string>Test Unofficial Achievements</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="hardcoreMode">
<property name="text">
<string>Enable Hardcore Mode</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enable">
<property name="text">
<string>Enable Achievements</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="spectatorMode">
<property name="text">
<string>Enable Spectator Mode</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="encoreMode">
<property name="text">
<string>Enable Encore Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="notificationBox">
<property name="title">
<string>Notifications</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,0">
<item row="0" column="1">
<layout class="QHBoxLayout" name="achievementNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="achievementNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="achievementNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="achievementNotifications">
<property name="text">
<string>Show Achievement Notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="leaderboardNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="leaderboardNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leaderboardNotifications">
<property name="text">
<string>Show Leaderboard Notifications</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="soundEffects">
<property name="text">
<string>Enable Sound Effects</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="overlays">
<property name="text">
<string>Enable In-Game Overlays</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="soundEffectsBox">
<property name="title">
<string>Sound Effects</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="5" column="0">
<widget class="QLineEdit" name="lbSoundPath"/>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="notificationSoundPath"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="unlockSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="notificationSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="unlockSound">
<property name="text">
<string>Achievement Unlock Sound</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="notificationSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="unlockSoundPath"/>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="lbSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="unlockSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="notificationSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="notificationSound">
<property name="text">
<string>Notification Sound</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="lbSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="unlockSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QPushButton" name="lbSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="lbSound">
<property name="text">
<string>Leaderboard Submit Sound</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="loginBox">
<property name="title">
<string>Account</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<item>
<widget class="QLabel" name="loginStatus">
<property name="text">
<string>Username:
Login token generated at:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="viewProfile">
<property name="text">
<string>View Profile...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loginButton">
<property name="text">
<string>Login...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="achievementButtons">
<item>
<widget class="QPushButton" name="viewProfile">
<property name="text">
<string>View Profile...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loginButton">
<property name="text">
<string>Login...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameInfoBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>75</height>
</size>
</property>
<property name="title">
<string>Game Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="gameInfo">
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="rcheevosDisclaimer">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at &lt;a href=&quot;https://retroachievements.org/&quot;&gt;retroachievements.org&lt;/a&gt;.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To view the achievement list in-game, press the hotkey for &lt;span style=&quot; font-weight:600;&quot;&gt;Open Pause Menu&lt;/span&gt; and select &lt;span style=&quot; font-weight:600;&quot;&gt;Achievements&lt;/span&gt; from the menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>8</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameInfoBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>75</height>
</size>
</property>
<property name="title">
<string>Game Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="gameInfo">
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at &lt;a href=&quot;https://retroachievements.org/&quot;&gt;retroachievements.org&lt;/a&gt;.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To view the achievement list in-game, press the hotkey for &lt;span style=&quot; font-weight:600;&quot;&gt;Open Pause Menu&lt;/span&gt; and select &lt;span style=&quot; font-weight:600;&quot;&gt;Achievements&lt;/span&gt; from the menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>8</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@@ -32,9 +32,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-447</y>
<y>-449</y>
<width>790</width>
<height>1049</height>
<height>1051</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">

View File

@@ -74,10 +74,6 @@ namespace Achievements
// Chrome uses 10 server calls per domain, seems reasonable.
static constexpr u32 MAX_CONCURRENT_SERVER_CALLS = 10;
static constexpr const char* INFO_SOUND_NAME = "sounds/achievements/message.wav";
static constexpr const char* UNLOCK_SOUND_NAME = "sounds/achievements/unlock.wav";
static constexpr const char* LBSUBMIT_SOUND_NAME = "sounds/achievements/lbsubmit.wav";
namespace
{
struct LoginWithPasswordParameters
@@ -1050,9 +1046,8 @@ void Achievements::DisplayAchievementSummary()
});
}
// Technically not going through the resource API, but since we're passing this to something else, we can't.
if (EmuConfig.Achievements.SoundEffects)
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(INFO_SOUND_NAME).c_str());
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.InfoSound)
Common::PlaySoundAsync(EmuConfig.Achievements.InfoSoundName.c_str());
}
void Achievements::DisplayHardcoreDeferredMessage()
@@ -1103,8 +1098,8 @@ void Achievements::HandleUnlockEvent(const rc_client_event_t* event)
});
}
if (EmuConfig.Achievements.SoundEffects)
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(UNLOCK_SOUND_NAME).c_str());
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.UnlockSound)
Common::PlaySoundAsync(EmuConfig.Achievements.UnlockSoundName.c_str());
}
void Achievements::HandleGameCompleteEvent(const rc_client_event_t* event)
@@ -1197,8 +1192,8 @@ void Achievements::HandleLeaderboardSubmittedEvent(const rc_client_event_t* even
});
}
if (EmuConfig.Achievements.SoundEffects)
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(LBSUBMIT_SOUND_NAME).c_str());
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.LBSubmitSound)
Common::PlaySoundAsync(EmuConfig.Achievements.LBSubmitSoundName.c_str());
}
void Achievements::HandleLeaderboardScoreboardEvent(const rc_client_event_t* event)

View File

@@ -1209,6 +1209,9 @@ struct Pcsx2Config
static constexpr u32 MAXIMUM_NOTIFICATION_DURATION = 30;
static constexpr u32 DEFAULT_NOTIFICATION_DURATION = 5;
static constexpr u32 DEFAULT_LEADERBOARD_DURATION = 10;
static constexpr const char* DEFAULT_INFO_SOUND_NAME = "sounds/achievements/message.wav";
static constexpr const char* DEFAULT_UNLOCK_SOUND_NAME = "sounds/achievements/unlock.wav";
static constexpr const char* DEFAULT_LBSUBMIT_SOUND_NAME = "sounds/achievements/lbsubmit.wav";
BITFIELD32()
bool
@@ -1220,12 +1223,19 @@ struct Pcsx2Config
Notifications : 1,
LeaderboardNotifications : 1,
SoundEffects : 1,
InfoSound : 1,
UnlockSound : 1,
LBSubmitSound : 1,
Overlays : 1;
BITFIELD_END
u32 NotificationsDuration = DEFAULT_NOTIFICATION_DURATION;
u32 LeaderboardsDuration = DEFAULT_LEADERBOARD_DURATION;
std::string InfoSoundName;
std::string UnlockSoundName;
std::string LBSubmitSoundName;
AchievementsOptions();
void LoadSave(SettingsWrapper& wrap);

View File

@@ -272,6 +272,7 @@ namespace FullscreenUI
static void SwitchToLanding();
static ImGuiFullscreen::FileSelectorFilters GetOpenFileFilters();
static ImGuiFullscreen::FileSelectorFilters GetDiscImageFilters();
static ImGuiFullscreen::FileSelectorFilters GetAudioFileFilters();
static void DoStartPath(
const std::string& path, std::optional<s32> state_index = std::nullopt, std::optional<bool> fast_boot = std::nullopt);
static void DoStartFile();
@@ -1059,6 +1060,11 @@ ImGuiFullscreen::FileSelectorFilters FullscreenUI::GetDiscImageFilters()
return {"*.bin", "*.iso", "*.cue", "*.mdf", "*.chd", "*.cso", "*.zso", "*.gz"};
}
ImGuiFullscreen::FileSelectorFilters FullscreenUI::GetAudioFileFilters()
{
return {"*.wav"};
}
void FullscreenUI::DoStartPath(const std::string& path, std::optional<s32> state_index, std::optional<bool> fast_boot)
{
VMBootParameters params;
@@ -7129,6 +7135,46 @@ void FullscreenUI::DrawAchievementsSettingsPage(std::unique_lock<std::mutex>& se
if (!IsEditingGameSettings(bsi))
{
MenuHeading(FSUI_CSTR("Sound Effects"));
if (MenuButton(FSUI_ICONSTR(ICON_FA_MUSIC, "Notification Sound"), bsi->GetTinyStringValue("Achievements", "InfoSoundName")))
{
auto callback = [bsi](const std::string& path) {
if (!path.empty())
{
bsi->SetStringValue("Achievements", "InfoSoundName", path.c_str());
SetSettingsChanged(bsi);
}
CloseFileSelector();
};
OpenFileSelector(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Select Notification Sound"), false, std::move(callback), GetAudioFileFilters());
}
if (MenuButton(FSUI_ICONSTR(ICON_FA_MUSIC, "Unlock Sound"), bsi->GetTinyStringValue("Achievements", "UnlockSoundName")))
{
auto callback = [bsi](const std::string& path) {
if (!path.empty())
{
bsi->SetStringValue("Achievements", "UnlockSoundName", path.c_str());
SetSettingsChanged(bsi);
}
CloseFileSelector();
};
OpenFileSelector(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Select Unlock Sound"), false, std::move(callback), GetAudioFileFilters());
}
if (MenuButton(FSUI_ICONSTR(ICON_FA_MUSIC, "Leaderboard Submit Sound"), bsi->GetTinyStringValue("Achievements", "LBSubmitSoundName")))
{
auto callback = [bsi](const std::string& path) {
if (!path.empty())
{
bsi->SetStringValue("Achievements", "LBSubmitSoundName", path.c_str());
SetSettingsChanged(bsi);
}
CloseFileSelector();
};
OpenFileSelector(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Select Leaderboard Submit Sound"), false, std::move(callback), GetAudioFileFilters());
}
MenuHeading(FSUI_CSTR("Account"));
if (bsi->ContainsValue("Achievements", "Token"))
{

View File

@@ -488,7 +488,7 @@ ImFont* ImGuiManager::AddFixedFont(float size)
bool ImGuiManager::AddIconFonts(float size)
{
// clang-format off
static constexpr ImWchar range_fa[] = { 0xe06f,0xe06f,0xf002,0xf002,0xf005,0xf005,0xf007,0xf007,0xf00c,0xf00e,0xf011,0xf011,0xf013,0xf013,0xf017,0xf017,0xf019,0xf019,0xf021,0xf023,0xf025,0xf028,0xf02b,0xf02b,0xf02e,0xf02e,0xf030,0xf030,0xf03a,0xf03a,0xf03d,0xf03e,0xf04b,0xf04c,0xf04e,0xf04e,0xf050,0xf050,0xf052,0xf052,0xf05a,0xf05a,0xf05e,0xf05e,0xf063,0xf063,0xf067,0xf067,0xf06a,0xf06a,0xf06e,0xf06e,0xf071,0xf071,0xf077,0xf078,0xf07b,0xf07c,0xf084,0xf084,0xf091,0xf091,0xf0ac,0xf0ad,0xf0b0,0xf0b0,0xf0c5,0xf0c5,0xf0c7,0xf0c8,0xf0cb,0xf0cb,0xf0d0,0xf0d0,0xf0dc,0xf0dc,0xf0e2,0xf0e2,0xf0eb,0xf0eb,0xf0f3,0xf0f3,0xf0fe,0xf0fe,0xf11b,0xf11c,0xf120,0xf121,0xf129,0xf12a,0xf140,0xf140,0xf14a,0xf14a,0xf15b,0xf15b,0xf15d,0xf15d,0xf187,0xf188,0xf191,0xf192,0xf1b3,0xf1b3,0xf1de,0xf1de,0xf1e6,0xf1e6,0xf1ea,0xf1eb,0xf1f8,0xf1f8,0xf1fc,0xf1fc,0xf21e,0xf21e,0xf245,0xf245,0xf26c,0xf26c,0xf279,0xf279,0xf2bd,0xf2bd,0xf2db,0xf2db,0xf2f2,0xf2f2,0xf302,0xf302,0xf3c1,0xf3c1,0xf3fd,0xf3fd,0xf410,0xf410,0xf462,0xf462,0xf466,0xf466,0xf4e2,0xf4e2,0xf51f,0xf51f,0xf545,0xf545,0xf54c,0xf54c,0xf553,0xf553,0xf56d,0xf56d,0xf5a2,0xf5a2,0xf65d,0xf65e,0xf6a9,0xf6a9,0xf70e,0xf70e,0xf756,0xf756,0xf780,0xf780,0xf794,0xf794,0xf815,0xf815,0xf84c,0xf84c,0xf8cc,0xf8cc,0x0,0x0 };
static constexpr ImWchar range_fa[] = { 0xe06f,0xe06f,0xf001,0xf002,0xf005,0xf005,0xf007,0xf007,0xf00c,0xf00e,0xf011,0xf011,0xf013,0xf013,0xf017,0xf017,0xf019,0xf019,0xf021,0xf023,0xf025,0xf028,0xf02b,0xf02b,0xf02e,0xf02e,0xf030,0xf030,0xf03a,0xf03a,0xf03d,0xf03e,0xf04b,0xf04c,0xf04e,0xf04e,0xf050,0xf050,0xf052,0xf052,0xf05a,0xf05a,0xf05e,0xf05e,0xf063,0xf063,0xf067,0xf067,0xf06a,0xf06a,0xf06e,0xf06e,0xf071,0xf071,0xf077,0xf078,0xf07b,0xf07c,0xf084,0xf084,0xf091,0xf091,0xf0ac,0xf0ad,0xf0b0,0xf0b0,0xf0c5,0xf0c5,0xf0c7,0xf0c8,0xf0cb,0xf0cb,0xf0d0,0xf0d0,0xf0dc,0xf0dc,0xf0e2,0xf0e2,0xf0eb,0xf0eb,0xf0f3,0xf0f3,0xf0fe,0xf0fe,0xf11b,0xf11c,0xf120,0xf121,0xf129,0xf12a,0xf140,0xf140,0xf14a,0xf14a,0xf15b,0xf15b,0xf15d,0xf15d,0xf187,0xf188,0xf191,0xf192,0xf1b3,0xf1b3,0xf1de,0xf1de,0xf1e6,0xf1e6,0xf1ea,0xf1eb,0xf1f8,0xf1f8,0xf1fc,0xf1fc,0xf21e,0xf21e,0xf245,0xf245,0xf26c,0xf26c,0xf279,0xf279,0xf2bd,0xf2bd,0xf2db,0xf2db,0xf2f2,0xf2f2,0xf302,0xf302,0xf3c1,0xf3c1,0xf3fd,0xf3fd,0xf410,0xf410,0xf462,0xf462,0xf466,0xf466,0xf4e2,0xf4e2,0xf51f,0xf51f,0xf545,0xf545,0xf54c,0xf54c,0xf553,0xf553,0xf56d,0xf56d,0xf5a2,0xf5a2,0xf65d,0xf65e,0xf6a9,0xf6a9,0xf70e,0xf70e,0xf756,0xf756,0xf780,0xf780,0xf794,0xf794,0xf815,0xf815,0xf84c,0xf84c,0xf8cc,0xf8cc,0x0,0x0 };
static constexpr ImWchar range_pf[] = { 0x2198,0x2199,0x219e,0x21a7,0x21b0,0x21b3,0x21ba,0x21c3,0x21ce,0x21ce,0x21d0,0x21d4,0x21dc,0x21dd,0x21e0,0x21e3,0x21e6,0x21e8,0x21f3,0x21f3,0x21f7,0x21f8,0x21fa,0x21fb,0x2206,0x2208,0x221a,0x221a,0x227a,0x227d,0x22bf,0x22c8,0x2349,0x2349,0x235a,0x235e,0x2360,0x2361,0x2364,0x2367,0x237a,0x237b,0x237d,0x237d,0x237f,0x237f,0x23b2,0x23b5,0x23cc,0x23cc,0x23f4,0x23f7,0x2427,0x243a,0x243d,0x243d,0x2443,0x2443,0x2460,0x246b,0x248f,0x248f,0x24f5,0x24fd,0x24ff,0x24ff,0x2605,0x2605,0x2699,0x2699,0x278a,0x278e,0xe000,0xe001,0xff21,0xff3a,0x0,0x0 };
// clang-format on

View File

@@ -1830,6 +1830,9 @@ Pcsx2Config::AchievementsOptions::AchievementsOptions()
Notifications = true;
LeaderboardNotifications = true;
SoundEffects = true;
InfoSound = true;
UnlockSound = true;
LBSubmitSound = true;
Overlays = true;
}
@@ -1837,6 +1840,15 @@ void Pcsx2Config::AchievementsOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("Achievements");
if (InfoSoundName.empty())
InfoSoundName = Path::Combine(EmuFolders::Resources, DEFAULT_INFO_SOUND_NAME);
if (UnlockSoundName.empty())
UnlockSoundName = Path::Combine(EmuFolders::Resources, DEFAULT_UNLOCK_SOUND_NAME);
if (LBSubmitSoundName.empty())
LBSubmitSoundName = Path::Combine(EmuFolders::Resources, DEFAULT_LBSUBMIT_SOUND_NAME);
SettingsWrapBitBool(Enabled);
SettingsWrapBitBoolEx(HardcoreMode, "ChallengeMode");
SettingsWrapBitBool(EncoreMode);
@@ -1845,9 +1857,15 @@ void Pcsx2Config::AchievementsOptions::LoadSave(SettingsWrapper& wrap)
SettingsWrapBitBool(Notifications);
SettingsWrapBitBool(LeaderboardNotifications);
SettingsWrapBitBool(SoundEffects);
SettingsWrapBitBool(InfoSound);
SettingsWrapBitBool(UnlockSound);
SettingsWrapBitBool(LBSubmitSound);
SettingsWrapBitBool(Overlays);
SettingsWrapEntry(NotificationsDuration);
SettingsWrapEntry(LeaderboardsDuration);
SettingsWrapEntry(InfoSoundName);
SettingsWrapEntry(UnlockSoundName);
SettingsWrapEntry(LBSubmitSoundName);
if (wrap.IsLoading())
{
@@ -1877,6 +1895,7 @@ Pcsx2Config::Pcsx2Config()
EnableRecordingTools = true;
EnableGameFixes = true;
InhibitScreensaver = true;
UseSavestateSelector = true;
BackupSavestate = true;
WarnAboutUnsafeSettings = true;
ManuallySetRealTimeClock = false;