mirror of https://github.com/PCSX2/pcsx2
Qt: Refactor the remaining settings widgets
This commit is contained in:
parent
bd1b91b862
commit
ae084643c4
|
|
@ -19,13 +19,12 @@
|
|||
|
||||
const char* AUDIO_FILE_FILTER = QT_TRANSLATE_NOOP("MainWindow", "Audio Files (*.wav)");
|
||||
|
||||
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enable, "Achievements", "Enabled", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hardcoreMode, "Achievements", "ChallengeMode", false);
|
||||
|
|
@ -49,19 +48,19 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
|||
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 screen when a challenge/primed achievement is active."));
|
||||
dialog->registerWidgetHelp(m_ui.leaderboardOverlays, tr("Enable In-Game Leaderboard Overlays"), tr("Checked"), tr("Shows icons in the screen when leaderboard tracking is active."));
|
||||
dialog->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement/leaderboard overlays are positioned on the screen."));
|
||||
dialog->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement/leaderboard notification popups are positioned on the screen."));
|
||||
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."));
|
||||
dialog->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
|
||||
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 screen when a challenge/primed achievement is active."));
|
||||
dialog()->registerWidgetHelp(m_ui.leaderboardOverlays, tr("Enable In-Game Leaderboard Overlays"), tr("Checked"), tr("Shows icons in the screen when leaderboard tracking is active."));
|
||||
dialog()->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement/leaderboard overlays are positioned on the screen."));
|
||||
dialog()->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement/leaderboard notification popups are positioned on the screen."));
|
||||
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."));
|
||||
dialog()->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
|
||||
|
||||
connect(m_ui.enable, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
|
|
@ -76,7 +75,7 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
|||
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
|
||||
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged);
|
||||
|
||||
if (!m_dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
connect(m_ui.loginButton, &QPushButton::clicked, this, &AchievementSettingsWidget::onLoginLogoutPressed);
|
||||
connect(m_ui.viewProfile, &QPushButton::clicked, this, &AchievementSettingsWidget::onViewProfilePressed);
|
||||
|
|
@ -111,13 +110,13 @@ AchievementSettingsWidget::~AchievementSettingsWidget() = default;
|
|||
|
||||
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);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "Notifications", true);
|
||||
const bool lb_notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
|
||||
const bool sound = dialog()->getEffectiveBoolValue("Achievements", "SoundEffects", true);
|
||||
const bool info = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "InfoSound", true);
|
||||
const bool unlock = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "UnlockSound", true);
|
||||
const bool lbsound = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
|
||||
m_ui.hardcoreMode->setEnabled(enabled);
|
||||
m_ui.achievementNotifications->setEnabled(enabled);
|
||||
m_ui.leaderboardNotifications->setEnabled(enabled);
|
||||
|
|
@ -126,7 +125,7 @@ void AchievementSettingsWidget::updateEnableState()
|
|||
m_ui.leaderboardNotificationsDuration->setEnabled(lb_notifications);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setEnabled(lb_notifications);
|
||||
|
||||
if (!m_dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.notificationSoundPath->setEnabled(info);
|
||||
m_ui.notificationSoundBrowse->setEnabled(info);
|
||||
|
|
@ -149,10 +148,10 @@ void AchievementSettingsWidget::updateEnableState()
|
|||
m_ui.overlays->setEnabled(enabled);
|
||||
m_ui.leaderboardOverlays->setEnabled(enabled);
|
||||
|
||||
const bool overlays_enabled = enabled && (m_dialog->getEffectiveBoolValue("Achievements", "Overlays", true) ||
|
||||
m_dialog->getEffectiveBoolValue("Achievements", "LBOverlays", true));
|
||||
const bool notifications_enabled = enabled && (m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true) ||
|
||||
m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
|
||||
const bool overlays_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Overlays", true) ||
|
||||
dialog()->getEffectiveBoolValue("Achievements", "LBOverlays", true));
|
||||
const bool notifications_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Notifications", true) ||
|
||||
dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
|
||||
m_ui.overlaySettingsBox->setEnabled(overlays_enabled || notifications_enabled);
|
||||
m_ui.overlayPosition->setEnabled(overlays_enabled);
|
||||
m_ui.overlayPositionLabel->setEnabled(overlays_enabled);
|
||||
|
|
@ -169,8 +168,8 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
|
|||
if (!QtHost::IsVMValid())
|
||||
return;
|
||||
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool challenge = m_dialog->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool challenge = dialog()->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
|
||||
if (!enabled || !challenge)
|
||||
return;
|
||||
|
||||
|
|
@ -192,14 +191,14 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
|
|||
|
||||
void AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "NotificationsDuration",
|
||||
const float duration = dialog()->getEffectiveFloatValue("Achievements", "NotificationsDuration",
|
||||
Pcsx2Config::AchievementsOptions::DEFAULT_NOTIFICATION_DURATION);
|
||||
m_ui.achievementNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
}
|
||||
|
||||
void AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
|
||||
const float duration = dialog()->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
|
||||
Pcsx2Config::AchievementsOptions::DEFAULT_LEADERBOARD_DURATION);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
}
|
||||
|
|
@ -215,8 +214,8 @@ void AchievementSettingsWidget::updateLoginState()
|
|||
StringUtil::FromChars<u64>(Host::GetBaseStringSettingValue("Achievements", "LoginTimestamp", "0")).value_or(0);
|
||||
const QDateTime login_timestamp(QDateTime::fromSecsSinceEpoch(static_cast<qint64>(login_unix_timestamp)));
|
||||
m_ui.loginStatus->setText(tr("Username: %1\nLogin token generated on %2.")
|
||||
.arg(QString::fromStdString(username))
|
||||
.arg(login_timestamp.toString(Qt::TextDate)));
|
||||
.arg(QString::fromStdString(username))
|
||||
.arg(login_timestamp.toString(Qt::TextDate)));
|
||||
m_ui.loginButton->setText(tr("Logout"));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@
|
|||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#pragma once
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_AchievementSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class AchievementSettingsWidget : public QWidget
|
||||
class AchievementSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
explicit AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~AchievementSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
@ -28,6 +28,4 @@ private:
|
|||
void updateLoginState();
|
||||
|
||||
Ui::AchievementSettingsWidget m_ui;
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,515 +6,497 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>680</width>
|
||||
<height>480</height>
|
||||
<width>700</width>
|
||||
<height>1000</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<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::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="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::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="3" column="0">
|
||||
<widget class="QLabel" name="notificationPositionLabel">
|
||||
<property name="text">
|
||||
<string>Notification Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="notificationPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="overlaySettingsBox">
|
||||
<property name="title">
|
||||
<string>Overlay Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_overlay">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="overlayPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="overlayPositionLabel">
|
||||
<property name="text">
|
||||
<string>Overlay Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="overlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Overlays</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="leaderboardOverlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Leaderboard 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="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::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rcheevosDisclaimer">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="justify">PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at <a href="https://retroachievements.org/">retroachievements.org</a>.</p><p align="justify">To view the achievement list in-game, press the hotkey for <span style=" font-weight:600;">Open Pause Menu</span> and select <span style=" font-weight:600;">Achievements</span> from the menu.</p></body></html></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 class="QWidget" name="scrollAreaAchievements">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>661</width>
|
||||
<height>700</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="2" column="0">
|
||||
<widget class="QCheckBox" name="soundEffects">
|
||||
<property name="text">
|
||||
<string>Enable Sound Effects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="notificationPositionLabel">
|
||||
<property name="text">
|
||||
<string>Notification Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="notificationPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="overlaySettingsBox">
|
||||
<property name="title">
|
||||
<string>Overlay Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_overlay">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="overlayPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="overlayPositionLabel">
|
||||
<property name="text">
|
||||
<string>Overlay Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="overlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Overlays</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="leaderboardOverlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Leaderboard 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::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><html><head/><body><p align="justify">PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at <a href="https://retroachievements.org/">retroachievements.org</a>.</p><p align="justify">To view the achievement list in-game, press the hotkey for <span style=" font-weight:600;">Open Pause Menu</span> and select <span style=" font-weight:600;">Achievements</span> from the menu.</p></body></html></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>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <algorithm>
|
||||
|
||||
#include "AdvancedSettingsWidget.h"
|
||||
#include "QtHost.h"
|
||||
|
|
@ -10,13 +9,12 @@
|
|||
#include "SettingWidgetBinder.h"
|
||||
#include "SettingsWindow.h"
|
||||
|
||||
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeRecompiler, "EmuCore/CPU/Recompiler", "EnableEE", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeCache, "EmuCore/CPU/Recompiler", "EnableEECache", false);
|
||||
|
|
@ -35,7 +33,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeDivRoundingMode, "EmuCore/CPU", "FPUDiv.Roundmode", static_cast<int>(FPRoundMode::Nearest));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu0RoundingMode, "EmuCore/CPU", "VU0.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu1RoundingMode, "EmuCore/CPU", "VU1.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.eeClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.eeClampMode->itemText(getGlobalClampingModeIndex(-1))));
|
||||
m_ui.vu0ClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.vu0ClampMode->itemText(getGlobalClampingModeIndex(0))));
|
||||
|
|
@ -53,7 +51,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.gameFixes, "EmuCore", "EnableGameFixes", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.patches, "EmuCore", "EnablePatches", true);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
|
||||
tr("Show a save state selector UI when switching slots instead of showing a notification bubble."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
|
|
@ -72,82 +70,86 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pineEnable, "EmuCore", "EnablePINE", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.pineSlot, "EmuCore", "PINESlot", 28011);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
|
||||
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
|
||||
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
tr("Performs just-in-time binary translation of 64-bit MIPS-IV machine code to x86."));
|
||||
|
||||
//: Wait loop: When the game makes the CPU do nothing (loop/spin) while it waits for something to happen (usually an interrupt).
|
||||
dialog->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
|
||||
tr("Moderate speedup for some games, with no known side effects."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
|
||||
dialog()->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
|
||||
|
||||
//: INTC = Name of a PS2 register, leave as-is. "spin" = to make a cpu (or gpu) actively do nothing while you wait for something. Like spinning in a circle, you're moving but not actually going anywhere.
|
||||
dialog->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
|
||||
tr("Huge speedup for some games, with almost no compatibility side effects."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
|
||||
//: "Backpatching" = To edit previously generated code to change what it does (in this case, we generate direct memory accesses, then backpatch them to jump to a fancier handler function when we realize they need the fancier handler function)
|
||||
tr("Uses backpatching to avoid register flushing on every memory access."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
|
||||
tr("Pauses the virtual machine when a TLB miss occurs, instead of ignoring it and continuing. Note that the VM will pause after the "
|
||||
"end of the block, not on the instruction which caused the exception. Refer to the console to see the address where the invalid "
|
||||
"access occurred."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
|
||||
tr("Exposes an additional 96MB of memory to the virtual machine."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"), tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
|
||||
dialog()->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"),
|
||||
tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
|
||||
"Safe for most games, but a few games may exhibit graphical errors."));
|
||||
|
||||
//: VU0 = Vector Unit 0. One of the PS2's processors.
|
||||
dialog->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
|
||||
|
||||
//: VU1 = Vector Unit 1. One of the PS2's processors.
|
||||
dialog->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
//: mVU = PCSX2's recompiler for VU (Vector Unit) code (full name: microVU)
|
||||
m_ui.vuFlagHack, tr("mVU Flag Hack"), tr("Checked"), tr("Good speedup and high compatibility, may cause graphical errors."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
tr("Performs just-in-time binary translation of 32-bit MIPS-I machine code to x86."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
|
||||
tr("Automatically loads and applies fixes to known problematic games on game start."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
|
||||
tr("Automatically loads and applies compatibility patches to known problematic games."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
|
||||
dialog()->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
|
||||
tr("Determines the algorithm to be used when compressing savestates."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
|
||||
dialog()->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
|
||||
tr("Determines the level to be used when compressing savestates."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
|
||||
tr("Automatically saves the emulator state when powering down or exiting. You can then "
|
||||
"resume directly from where you left off next time."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
|
||||
//: Do not translate the ".backup" extension.
|
||||
tr("Creates a backup copy of a save state if it already exists when the save is created. The backup copy has a .backup suffix."));
|
||||
}
|
||||
|
|
@ -174,15 +176,15 @@ int AdvancedSettingsWidget::getGlobalClampingModeIndex(int vunum) const
|
|||
int AdvancedSettingsWidget::getClampingModeIndex(int vunum) const
|
||||
{
|
||||
// This is so messy... maybe we should just make the mode an int in the settings too...
|
||||
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
|
||||
std::optional<bool> default_false = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
|
||||
std::optional<bool> default_true = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
|
||||
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
|
||||
std::optional<bool> default_false = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
|
||||
std::optional<bool> default_true = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
|
||||
|
||||
std::optional<bool> third = m_dialog->getBoolValue(
|
||||
std::optional<bool> third = dialog()->getBoolValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), default_false);
|
||||
std::optional<bool> second = m_dialog->getBoolValue("EmuCore/CPU/Recompiler",
|
||||
std::optional<bool> second = dialog()->getBoolValue("EmuCore/CPU/Recompiler",
|
||||
(vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), default_false);
|
||||
std::optional<bool> first = m_dialog->getBoolValue(
|
||||
std::optional<bool> first = dialog()->getBoolValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), default_true);
|
||||
|
||||
if (third.has_value() && third.value())
|
||||
|
|
@ -201,25 +203,25 @@ void AdvancedSettingsWidget::setClampingMode(int vunum, int index)
|
|||
{
|
||||
std::optional<bool> first, second, third;
|
||||
|
||||
if (!m_dialog->isPerGameSettings() || index > 0)
|
||||
if (!dialog()->isPerGameSettings() || index > 0)
|
||||
{
|
||||
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
|
||||
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
|
||||
third = (index >= (base + 3));
|
||||
second = (index >= (base + 2));
|
||||
first = (index >= (base + 1));
|
||||
}
|
||||
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), third);
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), second);
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), first);
|
||||
}
|
||||
|
||||
void AdvancedSettingsWidget::onSavestateCompressionTypeChanged()
|
||||
{
|
||||
const bool uncompressed = (m_dialog->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
|
||||
static_cast<int>(SavestateCompressionMethod::Uncompressed));
|
||||
const bool uncompressed = (dialog()->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
|
||||
static_cast<int>(SavestateCompressionMethod::Uncompressed));
|
||||
m_ui.savestateCompressionLevel->setDisabled(uncompressed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_AdvancedSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class AdvancedSettingsWidget : public QWidget
|
||||
class AdvancedSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -18,13 +18,12 @@
|
|||
#include <algorithm>
|
||||
#include <bit>
|
||||
|
||||
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
for (u32 i = 0; i < static_cast<u32>(AudioBackend::Count); i++)
|
||||
m_ui.audioBackend->addItem(QString::fromUtf8(AudioStream::GetBackendDisplayName(static_cast<AudioBackend>(i))));
|
||||
|
|
@ -72,11 +71,11 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
updateLatencyLabel();
|
||||
|
||||
// for per-game, just use the normal path, since it needs to re-read/apply
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.volume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
|
||||
m_ui.fastForwardVolume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
|
||||
m_ui.muted->setChecked(m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
|
||||
m_ui.volume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
|
||||
m_ui.fastForwardVolume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
|
||||
m_ui.muted->setChecked(dialog()->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
|
||||
connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::onOutputVolumeChanged);
|
||||
connect(m_ui.fastForwardVolume, &QSlider::valueChanged, this, &AudioSettingsWidget::onFastForwardVolumeChanged);
|
||||
connect(m_ui.muted, &QCheckBox::checkStateChanged, this, &AudioSettingsWidget::onOutputMutedChanged);
|
||||
|
|
@ -91,39 +90,39 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
connect(m_ui.resetVolume, &QToolButton::clicked, this, [this]() { resetVolume(false); });
|
||||
connect(m_ui.resetFastForwardVolume, &QToolButton::clicked, this, [this]() { resetVolume(true); });
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.audioBackend, tr("Audio Backend"), QStringLiteral("Cubeb"),
|
||||
tr("The audio backend determines how frames produced by the emulator are submitted to the host. Cubeb provides the "
|
||||
"lowest latency, if you encounter issues, try the SDL backend. The null backend disables all host audio "
|
||||
"output."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.bufferMS, tr("Buffer Size"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_BUFFER_MS),
|
||||
tr("Determines the buffer size which the time stretcher will try to keep filled. It effectively selects the "
|
||||
"average latency, as audio will be stretched/shrunk to keep the buffer size within check."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.outputLatencyMS, tr("Output Latency"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS),
|
||||
tr("Determines the latency from the buffer to the host audio output. This can be set lower than the target latency "
|
||||
"to reduce audio delay."));
|
||||
dialog->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
|
||||
dialog()->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
|
||||
tr("Controls the volume of the audio played on the host."));
|
||||
dialog->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
|
||||
dialog()->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
|
||||
tr("Controls the volume of the audio played on the host when fast forwarding."));
|
||||
dialog->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
|
||||
tr("Prevents the emulator from producing any audible sound."));
|
||||
dialog->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
|
||||
dialog()->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
|
||||
tr("Determines how audio is expanded from stereo to surround for supported games. This "
|
||||
"includes games that support Dolby Pro Logic/Pro Logic II."));
|
||||
dialog->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
|
||||
dialog()->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
|
||||
tr("These settings fine-tune the behavior of the FreeSurround-based channel expander."));
|
||||
dialog->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
|
||||
dialog()->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
|
||||
tr("When running outside of 100% speed, adjusts the tempo on audio instead of dropping frames. Produces much nicer fast-forward/slowdown audio."));
|
||||
dialog->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
|
||||
dialog()->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
|
||||
tr("These settings fine-tune the behavior of the SoundTouch audio time stretcher when running outside of 100% speed."));
|
||||
dialog->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
|
||||
m_dialog->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
|
||||
dialog()->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
|
||||
dialog()->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
|
||||
tr("Resets output volume back to the default."));
|
||||
dialog->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
|
||||
m_dialog->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
|
||||
dialog()->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
|
||||
dialog()->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
|
||||
tr("Resets fast forward volume back to the default."));
|
||||
}
|
||||
|
||||
|
|
@ -132,10 +131,10 @@ AudioSettingsWidget::~AudioSettingsWidget() = default;
|
|||
AudioExpansionMode AudioSettingsWidget::getEffectiveExpansionMode() const
|
||||
{
|
||||
return AudioStream::ParseExpansionMode(
|
||||
m_dialog->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
|
||||
AudioStream::GetExpansionModeName(AudioStreamParameters::DEFAULT_EXPANSION_MODE))
|
||||
.c_str())
|
||||
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
|
||||
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
|
||||
}
|
||||
|
||||
u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
|
||||
|
|
@ -144,7 +143,7 @@ u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
|
|||
if (expansion_mode == AudioExpansionMode::Disabled)
|
||||
return 0;
|
||||
|
||||
const u32 config_block_size = m_dialog->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
|
||||
const u32 config_block_size = dialog()->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
|
||||
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE);
|
||||
return std::has_single_bit(config_block_size) ? config_block_size : std::bit_ceil(config_block_size);
|
||||
}
|
||||
|
|
@ -160,20 +159,20 @@ void AudioSettingsWidget::onSyncModeChanged()
|
|||
{
|
||||
const Pcsx2Config::SPU2Options::SPU2SyncMode sync_mode =
|
||||
Pcsx2Config::SPU2Options::ParseSyncMode(
|
||||
m_dialog->getEffectiveStringValue("SPU2/Output", "SyncMode",
|
||||
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE)
|
||||
).c_str()
|
||||
).value_or(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE);
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "SyncMode",
|
||||
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE))
|
||||
.c_str())
|
||||
.value_or(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE);
|
||||
m_ui.stretchSettings->setEnabled(sync_mode == Pcsx2Config::SPU2Options::SPU2SyncMode::TimeStretch);
|
||||
}
|
||||
|
||||
AudioBackend AudioSettingsWidget::getEffectiveBackend() const
|
||||
{
|
||||
return AudioStream::ParseBackendName(
|
||||
m_dialog->getEffectiveStringValue("SPU2/Output", "Backend",
|
||||
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND)
|
||||
).c_str()
|
||||
).value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "Backend",
|
||||
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND))
|
||||
.c_str())
|
||||
.value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
|
||||
}
|
||||
|
||||
void AudioSettingsWidget::updateDriverNames()
|
||||
|
|
@ -194,7 +193,7 @@ void AudioSettingsWidget::updateDriverNames()
|
|||
for (const std::pair<std::string, std::string>& it : names)
|
||||
m_ui.driver->addItem(QString::fromStdString(it.second), QString::fromStdString(it.first));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
|
||||
std::move(names.front().first));
|
||||
connect(m_ui.driver, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::updateDeviceNames);
|
||||
}
|
||||
|
|
@ -205,8 +204,8 @@ void AudioSettingsWidget::updateDriverNames()
|
|||
void AudioSettingsWidget::updateDeviceNames()
|
||||
{
|
||||
const AudioBackend backend = getEffectiveBackend();
|
||||
const std::string driver_name = m_dialog->getEffectiveStringValue("SPU2/Output", "DriverName", "");
|
||||
const std::string current_device = m_dialog->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
|
||||
const std::string driver_name = dialog()->getEffectiveStringValue("SPU2/Output", "DriverName", "");
|
||||
const std::string current_device = dialog()->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
|
||||
const std::vector<AudioStream::DeviceInfo> devices = AudioStream::GetOutputDevices(backend, driver_name.c_str());
|
||||
|
||||
m_ui.outputDevice->disconnect();
|
||||
|
|
@ -239,7 +238,7 @@ void AudioSettingsWidget::updateDeviceNames()
|
|||
QString::fromStdString(current_device));
|
||||
}
|
||||
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
|
||||
"DeviceName", std::move(devices.front().name));
|
||||
}
|
||||
|
||||
|
|
@ -249,9 +248,9 @@ void AudioSettingsWidget::updateDeviceNames()
|
|||
void AudioSettingsWidget::updateLatencyLabel()
|
||||
{
|
||||
const u32 expand_buffer_ms = AudioStream::GetMSForBufferSize(SPU2::SAMPLE_RATE, getEffectiveExpansionBlockSize());
|
||||
const u32 config_buffer_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
|
||||
const u32 config_output_latency_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
const bool minimal_output = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
const u32 config_buffer_ms = dialog()->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
|
||||
const u32 config_output_latency_ms = dialog()->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
const bool minimal_output = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
|
||||
//: Preserve the %1 variable, adapt the latter ms (and/or any possible spaces in between) to your language's ruleset.
|
||||
m_ui.outputLatencyLabel->setText(minimal_output ? tr("N/A") : tr("%1 ms").arg(config_output_latency_ms));
|
||||
|
|
@ -263,17 +262,17 @@ void AudioSettingsWidget::updateLatencyLabel()
|
|||
if (expand_buffer_ms > 0)
|
||||
{
|
||||
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms buffer + %3 ms expand + %4 ms output)")
|
||||
.arg(config_buffer_ms + expand_buffer_ms + output_latency_ms)
|
||||
.arg(config_buffer_ms)
|
||||
.arg(expand_buffer_ms)
|
||||
.arg(output_latency_ms));
|
||||
.arg(config_buffer_ms + expand_buffer_ms + output_latency_ms)
|
||||
.arg(config_buffer_ms)
|
||||
.arg(expand_buffer_ms)
|
||||
.arg(output_latency_ms));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms buffer + %3 ms output)")
|
||||
.arg(config_buffer_ms + output_latency_ms)
|
||||
.arg(config_buffer_ms)
|
||||
.arg(output_latency_ms));
|
||||
.arg(config_buffer_ms + output_latency_ms)
|
||||
.arg(config_buffer_ms)
|
||||
.arg(output_latency_ms));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -281,8 +280,8 @@ void AudioSettingsWidget::updateLatencyLabel()
|
|||
if (expand_buffer_ms > 0)
|
||||
{
|
||||
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms expand, minimum output latency unknown)")
|
||||
.arg(expand_buffer_ms + config_buffer_ms)
|
||||
.arg(expand_buffer_ms));
|
||||
.arg(expand_buffer_ms + config_buffer_ms)
|
||||
.arg(expand_buffer_ms));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -299,7 +298,7 @@ void AudioSettingsWidget::updateVolumeLabel()
|
|||
|
||||
void AudioSettingsWidget::onMinimalOutputLatencyChanged()
|
||||
{
|
||||
const bool minimal = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
const bool minimal = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
m_ui.outputLatencyMS->setEnabled(!minimal);
|
||||
updateLatencyLabel();
|
||||
}
|
||||
|
|
@ -307,7 +306,7 @@ void AudioSettingsWidget::onMinimalOutputLatencyChanged()
|
|||
void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
Host::SetBaseIntSettingValue("SPU2/Output", "OutputVolume", new_value);
|
||||
Host::CommitBaseSettingChanges();
|
||||
g_emu_thread->applySettings();
|
||||
|
|
@ -318,7 +317,7 @@ void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
|||
void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
Host::SetBaseIntSettingValue("SPU2/Output", "FastForwardVolume", new_value);
|
||||
Host::CommitBaseSettingChanges();
|
||||
g_emu_thread->applySettings();
|
||||
|
|
@ -329,7 +328,7 @@ void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
|
|||
void AudioSettingsWidget::onOutputMutedChanged(int new_state)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
|
||||
const bool muted = (new_state != 0);
|
||||
Host::SetBaseBoolSettingValue("SPU2/Output", "OutputMuted", muted);
|
||||
|
|
@ -344,7 +343,7 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
|
|||
dlgui.setupUi(&dlg);
|
||||
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.blockSize, "SPU2/Output", "ExpandBlockSize",
|
||||
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE, 0);
|
||||
QtUtils::BindLabelToSlider(dlgui.blockSize, dlgui.blockSizeLabel);
|
||||
|
|
@ -378,42 +377,42 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
|
|||
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE));
|
||||
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CIRCULAR_WRAP));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandShift",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandDepth",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandFocus",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CENTER_IMAGE));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FRONT_SEPARATION));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_REAR_SEPARATION));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_LOW_CUTOFF));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_HIGH_CUTOFF));
|
||||
|
||||
|
|
@ -433,7 +432,7 @@ void AudioSettingsWidget::onStretchSettingsClicked()
|
|||
dlgui.setupUi(&dlg);
|
||||
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.sequenceLength, "SPU2/Output", "StretchSequenceLengthMS",
|
||||
AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH, 0);
|
||||
QtUtils::BindLabelToSlider(dlgui.sequenceLength, dlgui.sequenceLengthLabel);
|
||||
|
|
@ -450,24 +449,24 @@ void AudioSettingsWidget::onStretchSettingsClicked()
|
|||
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEEKWINDOW));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_OVERLAP));
|
||||
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_QUICKSEEK));
|
||||
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_AA_FILTER));
|
||||
|
||||
|
|
@ -485,11 +484,11 @@ void AudioSettingsWidget::resetVolume(bool fast_forward)
|
|||
QSlider* const slider = fast_forward ? m_ui.fastForwardVolume : m_ui.volume;
|
||||
QLabel* const label = fast_forward ? m_ui.fastForwardVolumeLabel : m_ui.volumeLabel;
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_dialog->removeSettingValue("SPU2/Output", key);
|
||||
dialog()->removeSettingValue("SPU2/Output", key);
|
||||
|
||||
const int value = m_dialog->getEffectiveIntValue("SPU2/Output", key, 100);
|
||||
const int value = dialog()->getEffectiveIntValue("SPU2/Output", key, 100);
|
||||
QSignalBlocker sb(slider);
|
||||
slider->setValue(value);
|
||||
label->setText(QStringLiteral("%1%2").arg(value).arg(tr("%")));
|
||||
|
|
|
|||
|
|
@ -5,21 +5,17 @@
|
|||
|
||||
#include "ui_AudioSettingsWidget.h"
|
||||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
enum class AudioBackend : u8;
|
||||
enum class AudioExpansionMode : u8;
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class AudioSettingsWidget : public QWidget
|
||||
class AudioSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~AudioSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
@ -45,6 +41,5 @@ private:
|
|||
void resetVolume(bool fast_forward);
|
||||
|
||||
Ui::AudioSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
u32 m_output_device_latency = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,25 +14,23 @@
|
|||
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <algorithm>
|
||||
|
||||
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBoot, "EmuCore", "EnableFastBoot", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBootFastForward, "EmuCore", "EnableFastBootFastForward", false);
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.searchDirectory, m_ui.browseSearchDirectory, m_ui.openSearchDirectory,
|
||||
m_ui.resetSearchDirectory, "Folders", "Bios", Path::Combine(EmuFolders::DataRoot, "bios"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
|
||||
tr("Patches the BIOS to skip the console's boot animation."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
|
||||
tr("Removes emulation speed throttle until the game starts to reduce startup time."));
|
||||
|
||||
refreshList();
|
||||
|
|
@ -140,6 +138,6 @@ void BIOSSettingsWidget::listItemChanged(const QTreeWidgetItem* current, const Q
|
|||
|
||||
void BIOSSettingsWidget::fastBootChanged()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
|
||||
m_ui.fastBootFastForward->setEnabled(enabled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,25 +3,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <string>
|
||||
|
||||
#include "ui_BIOSSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
class QThread;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class BIOSSettingsWidget : public QWidget
|
||||
class BIOSSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~BIOSSettingsWidget();
|
||||
|
||||
static void populateList(QTreeWidget* list, const std::string& directory);
|
||||
|
|
@ -35,5 +26,4 @@ private Q_SLOTS:
|
|||
|
||||
private:
|
||||
Ui::BIOSSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,13 +44,12 @@ static const char* s_dns_name[] = {
|
|||
|
||||
using PacketReader::IP::IP_Address;
|
||||
|
||||
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog{dialog}
|
||||
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Eth Enabled
|
||||
|
|
@ -75,7 +74,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
|||
connect(m_ui.ethInterceptDHCP, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onEthDHCPInterceptChanged);
|
||||
|
||||
//IP settings
|
||||
const IPValidator* ipValidator = new IPValidator(this, m_dialog->isPerGameSettings());
|
||||
const IPValidator* ipValidator = new IPValidator(this, dialog()->isPerGameSettings());
|
||||
|
||||
// clang-format off
|
||||
m_ui.ethPS2Addr ->setValidator(ipValidator);
|
||||
|
|
@ -84,13 +83,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
|||
m_ui.ethDNS1Addr ->setValidator(ipValidator);
|
||||
m_ui.ethDNS2Addr ->setValidator(ipValidator);
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
|
||||
|
||||
m_ui.ethPS2Addr ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "PS2IP", "0.0.0.0").c_str()));
|
||||
m_ui.ethNetMask ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "Mask", "0.0.0.0").c_str()));
|
||||
|
|
@ -100,11 +99,11 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
|
||||
}
|
||||
|
||||
connect(m_ui.ethPS2Addr, &QLineEdit::editingFinished, this, [&]() { onEthIPChanged(m_ui.ethPS2Addr, "DEV9/Eth", "PS2IP" ); });
|
||||
|
|
@ -171,13 +170,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
|||
connect(m_ui.hddEnabled, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddEnabledChanged);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hddEnabled, "DEV9/Hdd", "HddEnable", false);
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
|
||||
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
|
||||
m_ui.hddFile->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw")));
|
||||
}
|
||||
else
|
||||
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
|
||||
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
|
||||
|
||||
connect(m_ui.hddLBA48, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddLBA48Changed);
|
||||
|
||||
|
|
@ -221,7 +220,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
|
|||
{
|
||||
std::vector<AdapterEntry> list = m_adapter_list[static_cast<u32>(m_api_list[index])];
|
||||
|
||||
const std::string value = m_dialog->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
|
||||
const std::string value = dialog()->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
|
||||
for (size_t i = 0; i < list.size(); i++)
|
||||
{
|
||||
m_ui.ethDev->addItem(QString::fromUtf8(list[i].name));
|
||||
|
|
@ -232,7 +231,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
|
|||
selectedApi = m_api_list[index];
|
||||
}
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
|
|
@ -277,13 +276,13 @@ void DEV9SettingsWidget::onEthDeviceChanged(int index)
|
|||
{
|
||||
const AdapterEntry& adapter = m_adapter_list[static_cast<u32>(m_api_list[m_ui.ethDevType->currentIndex()])][index];
|
||||
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
|
||||
}
|
||||
else if (m_dialog->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
|
||||
else if (dialog()->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
|
||||
{
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -323,8 +322,8 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
|
|||
//Alow clearing a per-game ip setting
|
||||
if (sender->text().isEmpty())
|
||||
{
|
||||
if (m_dialog->getStringValue(section, key, std::nullopt).has_value())
|
||||
m_dialog->setStringSettingValue(section, key, std::nullopt);
|
||||
if (dialog()->getStringValue(section, key, std::nullopt).has_value())
|
||||
dialog()->setStringSettingValue(section, key, std::nullopt);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -337,9 +336,9 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
|
|||
|
||||
sender->setText(QString::fromUtf8(neatStr.c_str()));
|
||||
|
||||
std::string oldval = m_dialog->getStringValue(section, key, "0.0.0.0").value();
|
||||
std::string oldval = dialog()->getStringValue(section, key, "0.0.0.0").value();
|
||||
if (neatStr != oldval)
|
||||
m_dialog->setStringSettingValue(section, key, neatStr.c_str());
|
||||
dialog()->setStringSettingValue(section, key, neatStr.c_str());
|
||||
}
|
||||
|
||||
void DEV9SettingsWidget::onEthAutoChanged(QCheckBox* sender, Qt::CheckState state, QLineEdit* input, const char* section, const char* key)
|
||||
|
|
@ -357,7 +356,7 @@ void DEV9SettingsWidget::onEthDNSModeChanged(QComboBox* sender, int index, QLine
|
|||
{
|
||||
if (sender->isEnabled())
|
||||
{
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
|
|
@ -522,7 +521,7 @@ void DEV9SettingsWidget::onEthHostImport()
|
|||
|
||||
void DEV9SettingsWidget::onEthHostPerGame()
|
||||
{
|
||||
const std::optional<int> hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
const std::optional<int> hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
if (!hostLengthOpt.has_value())
|
||||
{
|
||||
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Per Game Host list"),
|
||||
|
|
@ -532,12 +531,12 @@ void DEV9SettingsWidget::onEthHostPerGame()
|
|||
switch (ret)
|
||||
{
|
||||
case QMessageBox::StandardButton::No:
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
break;
|
||||
|
||||
case QMessageBox::StandardButton::Yes:
|
||||
{
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
std::vector<HostEntryUi> hosts = ListBaseHostsConfig();
|
||||
for (size_t i = 0; i < hosts.size(); i++)
|
||||
AddNewHostConfig(hosts[i]);
|
||||
|
|
@ -563,7 +562,7 @@ void DEV9SettingsWidget::onEthHostPerGame()
|
|||
for (int i = hostLength - 1; i >= 0; i--)
|
||||
DeleteHostConfig(i);
|
||||
}
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
|
||||
}
|
||||
|
||||
RefreshHostList();
|
||||
|
|
@ -576,16 +575,16 @@ void DEV9SettingsWidget::onEthHostEdit(QStandardItem* item)
|
|||
switch (item->column())
|
||||
{
|
||||
case 0: //Name
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 1: //URL
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 2: //IP
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 3: //Enabled
|
||||
m_dialog->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
|
||||
dialog()->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -634,9 +633,9 @@ void DEV9SettingsWidget::onHddFileEdit()
|
|||
// Also save the hddPath setting
|
||||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
if (hddPath.empty())
|
||||
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
|
||||
else
|
||||
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
|
||||
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
|
||||
|
||||
UpdateHddSizeUIValues();
|
||||
}
|
||||
|
|
@ -716,7 +715,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIEnabled()
|
|||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
|
||||
bool enableSizeUI;
|
||||
if (m_dialog->isPerGameSettings() && hddPath.empty())
|
||||
if (dialog()->isPerGameSettings() && hddPath.empty())
|
||||
enableSizeUI = false;
|
||||
else
|
||||
enableSizeUI = m_ui.hddFile->isEnabled();
|
||||
|
|
@ -733,7 +732,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIValues()
|
|||
{
|
||||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
|
||||
if (m_dialog->isPerGameSettings() && hddPath.empty())
|
||||
if (dialog()->isPerGameSettings() && hddPath.empty())
|
||||
hddPath = m_ui.hddFile->placeholderText().toStdString();
|
||||
|
||||
if (!Path::IsAbsolute(hddPath))
|
||||
|
|
@ -770,7 +769,7 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event)
|
|||
{
|
||||
//The API combobox dosn't set the EthApi field, that is performed by the device combobox (in addition to saving the device)
|
||||
//This means that this setting can get out of sync with true value, so revert to that if the ui is closed and opened
|
||||
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
|
||||
//SignalBlocker to prevent saving a value already in the config file
|
||||
QSignalBlocker sb(m_ui.ethDev);
|
||||
|
|
@ -864,7 +863,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
|||
m_api_valuelist.push_back(nullptr);
|
||||
|
||||
//We replace the blank entry with one for global settings
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
const std::string valueAPI = Host::GetBaseStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]);
|
||||
for (int i = 0; Pcsx2Config::DEV9Options::NetApiNames[i] != nullptr; i++)
|
||||
|
|
@ -892,7 +891,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
|||
m_adapter_list[static_cast<u32>(Pcsx2Config::DEV9Options::NetApi::Unset)][0].name = baseAdapter;
|
||||
}
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
m_ui.ethDevType->addItem(tr("Use Global Setting [%1]").arg(QString::fromUtf8(Pcsx2Config::DEV9Options::NetApiNames[static_cast<u32>(m_global_api)])));
|
||||
else
|
||||
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[0]));
|
||||
|
|
@ -900,7 +899,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
|||
for (int i = 1; m_api_namelist[i] != nullptr; i++)
|
||||
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[i]));
|
||||
|
||||
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
|
||||
for (int i = 0; m_api_namelist[i] != nullptr; i++)
|
||||
{
|
||||
|
|
@ -924,7 +923,7 @@ void DEV9SettingsWidget::RefreshHostList()
|
|||
|
||||
std::vector<HostEntryUi> hosts;
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.ethHostPerGame->setVisible(true);
|
||||
|
||||
|
|
@ -988,7 +987,7 @@ void DEV9SettingsWidget::RefreshHostList()
|
|||
|
||||
int DEV9SettingsWidget::CountHostsConfig()
|
||||
{
|
||||
return m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
|
||||
return dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
|
||||
}
|
||||
|
||||
std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
||||
|
|
@ -996,14 +995,14 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
|||
std::vector<HostEntryUi> hosts;
|
||||
|
||||
std::optional<int> hostLengthOpt;
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
if (!hostLengthOpt.has_value())
|
||||
return std::nullopt;
|
||||
}
|
||||
else
|
||||
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
|
||||
const int hostLength = hostLengthOpt.value();
|
||||
for (int i = 0; i < hostLength; i++)
|
||||
|
|
@ -1011,10 +1010,10 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
|||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(i);
|
||||
|
||||
HostEntryUi entry;
|
||||
entry.Url = m_dialog->getStringValue(section.c_str(), "Url", "").value();
|
||||
entry.Desc = m_dialog->getStringValue(section.c_str(), "Desc", "").value();
|
||||
entry.Address = m_dialog->getStringValue(section.c_str(), "Address", "").value();
|
||||
entry.Enabled = m_dialog->getBoolValue(section.c_str(), "Enabled", false).value();
|
||||
entry.Url = dialog()->getStringValue(section.c_str(), "Url", "").value();
|
||||
entry.Desc = dialog()->getStringValue(section.c_str(), "Desc", "").value();
|
||||
entry.Address = dialog()->getStringValue(section.c_str(), "Address", "").value();
|
||||
entry.Enabled = dialog()->getBoolValue(section.c_str(), "Enabled", false).value();
|
||||
hosts.push_back(entry);
|
||||
}
|
||||
|
||||
|
|
@ -1046,12 +1045,12 @@ void DEV9SettingsWidget::AddNewHostConfig(const HostEntryUi& host)
|
|||
const int hostLength = CountHostsConfig();
|
||||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength);
|
||||
// clang-format off
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
|
||||
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
|
||||
dialog()->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
|
||||
// clang-format on
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
|
||||
RefreshHostList();
|
||||
}
|
||||
|
||||
|
|
@ -1066,10 +1065,10 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
|
|||
std::string sectionAhead = "DEV9/Eth/Hosts/Host" + std::to_string(i + 1);
|
||||
|
||||
// clang-format off
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", m_dialog->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", m_dialog->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", m_dialog->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
|
||||
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", m_dialog->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", dialog()->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", dialog()->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", dialog()->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
|
||||
dialog()->setBoolSettingValue (section.c_str(), "Enabled", dialog()->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
|
|
@ -1077,9 +1076,9 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
|
|||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength - 1);
|
||||
//Specifying a value of nullopt will delete the key
|
||||
//if the key is a nullptr, the whole section is deleted
|
||||
m_dialog->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
|
||||
dialog()->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
|
||||
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
|
||||
RefreshHostList();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,18 +3,17 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
#include "ui_DEV9SettingsWidget.h"
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
#include "DEV9UiCommon.h"
|
||||
#include "DEV9DnsHostDialog.h"
|
||||
#include "DEV9/net.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
class DEV9SettingsWidget : public QWidget
|
||||
class DEV9SettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
@ -43,7 +42,7 @@ private Q_SLOTS:
|
|||
void onHddCreateClicked();
|
||||
|
||||
public:
|
||||
DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~DEV9SettingsWidget();
|
||||
|
||||
protected:
|
||||
|
|
@ -63,8 +62,6 @@ private:
|
|||
void UpdateHddSizeUIEnabled();
|
||||
void UpdateHddSizeUIValues();
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
|
||||
Ui::DEV9SettingsWidget m_ui;
|
||||
|
||||
bool m_firstShow{true};
|
||||
|
|
|
|||
|
|
@ -20,17 +20,17 @@ static const char* s_drop_indicators[] = {
|
|||
nullptr,
|
||||
};
|
||||
|
||||
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: SettingsWidget(dialog, parent)
|
||||
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// User Interface Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
setupTab(tr("User Interface"), &m_user_interface);
|
||||
setupTab(m_user_interface, tr("User Interface"));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_user_interface.refreshInterval, "Debugger/UserInterface", "RefreshInterval", 1000);
|
||||
|
|
@ -38,20 +38,20 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
if (g_debugger_window)
|
||||
g_debugger_window->updateFromSettings();
|
||||
});
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.refreshInterval, tr("Refresh Interval"), tr("1000ms"),
|
||||
tr("The amount of time to wait between subsequent attempts to update the user interface to reflect the state "
|
||||
"of the virtual machine."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_user_interface.showOnStartup, "Debugger/UserInterface", "ShowOnStartup", false);
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.showOnStartup, tr("Show On Startup"), tr("Unchecked"),
|
||||
tr("Open the debugger window automatically when PCSX2 starts."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_user_interface.saveWindowGeometry, "Debugger/UserInterface", "SaveWindowGeometry", true);
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.saveWindowGeometry, tr("Save Window Geometry"), tr("Checked"),
|
||||
tr("Save the position and size of the debugger window when it is closed so that it can be restored later."));
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
s_drop_indicators,
|
||||
s_drop_indicators[0],
|
||||
"DebugUserInterfaceSettingsWidget");
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.dropIndicator, tr("Drop Indicator Style"), tr("Classic"),
|
||||
tr("Choose how the drop indicators that appear when you drag dock windows in the debugger are styled. "
|
||||
"You will have to restart the debugger for this option to take effect."));
|
||||
|
|
@ -73,7 +73,7 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Analysis Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
setupTab(tr("Analysis"), &m_analysis);
|
||||
setupTab(m_analysis, tr("Analysis"));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(
|
||||
sif, m_analysis.analysisCondition, "Debugger/Analysis", "RunCondition",
|
||||
|
|
@ -81,13 +81,13 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_analysis.generateSymbolsForIRXExportTables, "Debugger/Analysis", "GenerateSymbolsForIRXExports", true);
|
||||
|
||||
dialog->registerWidgetHelp(m_analysis.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
|
||||
dialog()->registerWidgetHelp(m_analysis.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
|
||||
tr("Choose when the analysis passes should be run: Always (to save time when opening the debugger), If "
|
||||
"Debugger Is Open (to save memory if you never open the debugger), or Never."));
|
||||
dialog->registerWidgetHelp(m_analysis.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_analysis.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
|
||||
tr("Hook IRX module loading/unloading and generate symbols for exported functions on the fly."));
|
||||
|
||||
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog);
|
||||
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog());
|
||||
|
||||
m_analysis.analysisSettings->setLayout(new QVBoxLayout());
|
||||
m_analysis.analysisSettings->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
|
|
@ -96,7 +96,7 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// GS Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
setupTab(tr("GS"), &m_gs);
|
||||
setupTab(m_gs, tr("GS"));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.dumpGSData, "EmuCore/GS", "DumpGSData", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveRT, "EmuCore/GS", "SaveRT", false);
|
||||
|
|
@ -121,77 +121,77 @@ DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Logging Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
setupTab(tr("Logging"), &m_logging);
|
||||
setupTab(m_logging, tr("Logging"));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEnable, "EmuCore/TraceLog", "Enabled", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEBIOS, "EmuCore/TraceLog", "EE.bios", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMemory, "EmuCore/TraceLog", "EE.memory", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEER5900, "EmuCore/TraceLog", "EE.r5900", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP0, "EmuCore/TraceLog", "EE.cop0", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP1, "EmuCore/TraceLog", "EE.cop1", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP2, "EmuCore/TraceLog", "EE.cop2", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECache, "EmuCore/TraceLog", "EE.cache", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMMIO, "EmuCore/TraceLog", "EE.knownhw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEUNKNWNMMIO, "EmuCore/TraceLog", "EE.unknownhw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMARegs, "EmuCore/TraceLog", "EE.dmahw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEIPU, "EmuCore/TraceLog", "EE.ipu", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIFTags, "EmuCore/TraceLog", "EE.giftag", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIFCodes, "EmuCore/TraceLog", "EE.vifcode", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMSKPATH3, "EmuCore/TraceLog", "EE.mskpath3", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMFIFO, "EmuCore/TraceLog", "EE.spr", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMACTRL, "EmuCore/TraceLog", "EE.dmac", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECounters, "EmuCore/TraceLog", "EE.counters", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIF, "EmuCore/TraceLog", "EE.vif", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIF, "EmuCore/TraceLog", "EE.gif", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPBIOS, "EmuCore/TraceLog", "IOP.Bios", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMemcards, "EmuCore/TraceLog", "IOP.memcards", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPR3000A, "EmuCore/TraceLog", "IOP.r3000a", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCOP2, "EmuCore/TraceLog", "IOP.cop2", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMMIO, "EmuCore/TraceLog", "IOP.knownhw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPUNKNWNMMIO, "EmuCore/TraceLog", "IOP.unknownhw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMARegs, "EmuCore/TraceLog", "IOP.dmahw", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPPad, "EmuCore/TraceLog", "IOP.pad", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMACTRL, "EmuCore/TraceLog", "IOP.dmac", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCounters, "EmuCore/TraceLog", "IOP.counters", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCDVD, "EmuCore/TraceLog", "IOP.cdvd", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMDEC, "EmuCore/TraceLog", "IOP.mdec", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEESIF, "EmuCore/TraceLog", "MISC.sif", false);
|
||||
dialog->registerWidgetHelp(m_logging.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
|
||||
dialog()->registerWidgetHelp(m_logging.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
|
||||
|
||||
connect(m_logging.chkEnable, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onLoggingEnableChanged);
|
||||
onLoggingEnableChanged();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
class DebugUserInterfaceSettingsWidget;
|
||||
class DebugAnalysisSettingsWidget;
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ class DebugSettingsWidget : public SettingsWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~DebugSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <limits>
|
||||
|
||||
#include "pcsx2/Host.h"
|
||||
|
||||
|
|
@ -18,13 +17,12 @@ static constexpr int DEFAULT_EE_CYCLE_RATE = 0;
|
|||
static constexpr int DEFAULT_EE_CYCLE_SKIP = 0;
|
||||
static constexpr u32 DEFAULT_FRAME_LATENCY = 2;
|
||||
|
||||
EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
initializeSpeedCombo(m_ui.normalSpeed, "Framerate", "NominalScalar", 1.0f);
|
||||
initializeSpeedCombo(m_ui.fastForwardSpeed, "Framerate", "TurboScalar", 2.0f);
|
||||
|
|
@ -38,7 +36,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
connect(m_ui.optimalFramePacing, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::onOptimalFramePacingChanged);
|
||||
connect(m_ui.vsync, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
|
||||
connect(m_ui.syncToHostRefreshRate, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
|
||||
m_ui.optimalFramePacing->setTristate(dialog->isPerGameSettings());
|
||||
m_ui.optimalFramePacing->setTristate(dialog()->isPerGameSettings());
|
||||
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeCycleSkipping, "EmuCore/Speedhacks", "EECycleSkip", DEFAULT_EE_CYCLE_SKIP);
|
||||
|
||||
|
|
@ -47,7 +45,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastCDVD, "EmuCore/Speedhacks", "fastCDVD", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.precacheCDVD, "EmuCore", "CdvdPrecache", false);
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToDateTimeSetting(sif, m_ui.rtcDateTime, "EmuCore");
|
||||
m_ui.rtcDateTime->setDateRange(QDate(2000, 1, 1), QDate(2099, 12, 31));
|
||||
|
|
@ -91,78 +89,76 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
}
|
||||
|
||||
const std::optional<int> cycle_rate =
|
||||
m_dialog->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
|
||||
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE)
|
||||
+ (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(m_dialog->isPerGameSettings()))
|
||||
: 0);
|
||||
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](int index) {
|
||||
dialog()->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
|
||||
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE) + (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(dialog()->isPerGameSettings())) : 0);
|
||||
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) {
|
||||
std::optional<int> value;
|
||||
if (!m_dialog->isPerGameSettings() || index > 0)
|
||||
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(m_dialog->isPerGameSettings());
|
||||
m_dialog->setIntSettingValue("EmuCore/Speedhacks", "EECycleRate", value);
|
||||
if (!dialog()->isPerGameSettings() || index > 0)
|
||||
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(dialog()->isPerGameSettings());
|
||||
dialog()->setIntSettingValue("EmuCore/Speedhacks", "EECycleRate", value);
|
||||
});
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hostFilesystem, "EmuCore", "HostFs", false);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), tr("100%"),
|
||||
dialog()->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), tr("100%"),
|
||||
tr("Sets the target emulation speed. It is not guaranteed that this speed will be reached, "
|
||||
"and if not, the emulator will run as fast as it can manage."));
|
||||
//: The "User Preference" string will appear after the text "Recommended Value:"
|
||||
dialog->registerWidgetHelp(m_ui.fastForwardSpeed, tr("Fast-Forward Speed"), tr("User Preference"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastForwardSpeed, tr("Fast-Forward Speed"), tr("User Preference"),
|
||||
tr("Sets the fast-forward speed. This speed will be used when the fast-forward hotkey is pressed/toggled."));
|
||||
//: The "User Preference" string will appear after the text "Recommended Value:"
|
||||
dialog->registerWidgetHelp(m_ui.slowMotionSpeed, tr("Slow-Motion Speed"), tr("User Preference"),
|
||||
dialog()->registerWidgetHelp(m_ui.slowMotionSpeed, tr("Slow-Motion Speed"), tr("User Preference"),
|
||||
tr("Sets the slow-motion speed. This speed will be used when the slow-motion hotkey is pressed/toggled."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeCycleRate, tr("EE Cycle Rate"), tr("100% (Normal Speed)"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeCycleRate, tr("EE Cycle Rate"), tr("100% (Normal Speed)"),
|
||||
tr("Higher values may increase internal framerate in games, but will increase CPU requirements substantially. "
|
||||
"Lower values will reduce the CPU load allowing lightweight games to run full speed on weaker CPUs."));
|
||||
dialog->registerWidgetHelp(m_ui.eeCycleSkipping, tr("EE Cycle Skip"), tr("Disabled"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeCycleSkipping, tr("EE Cycle Skip"), tr("Disabled"),
|
||||
tr("Makes the emulated Emotion Engine skip cycles. "
|
||||
//: SOTC = Shadow of the Colossus. A game's title, should not be translated unless an official translation exists.
|
||||
"Helps a small subset of games like SOTC. Most of the time it's harmful to performance."));
|
||||
dialog->registerWidgetHelp(m_ui.threadPinning, tr("Enable Thread Pinning"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.threadPinning, tr("Enable Thread Pinning"), tr("Unchecked"),
|
||||
tr("Sets the priority for specific threads in a specific order ignoring the system scheduler. "
|
||||
//: P-Core = Performance Core, E-Core = Efficiency Core. See if Intel has official translations for these terms.
|
||||
"May help CPUs with big (P) and little (E) cores (e.g., Intel 12th or newer generation CPUs or other vendors such as AMD)."));
|
||||
dialog->registerWidgetHelp(m_ui.MTVU, tr("Enable Multithreaded VU1 (MTVU1)"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.MTVU, tr("Enable Multithreaded VU1 (MTVU1)"), tr("Checked"),
|
||||
tr("Generally a speedup on CPUs with 4 or more cores. "
|
||||
"Safe for most games, but a few are incompatible and may hang."));
|
||||
dialog->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
|
||||
tr("Fast disc access, shorter loading times. Check HDLoader compatibility lists for games that are known to have issues with this."));
|
||||
dialog->registerWidgetHelp(m_ui.precacheCDVD, tr("Enable CDVD Precaching"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.precacheCDVD, tr("Enable CDVD Precaching"), tr("Unchecked"),
|
||||
tr("Loads the disc image into RAM before starting the virtual machine. Can reduce stutter on systems with hard drives that "
|
||||
"have long wake times, but significantly increases boot times."));
|
||||
dialog->registerWidgetHelp(m_ui.cheats, tr("Enable Cheats"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.cheats, tr("Enable Cheats"), tr("Unchecked"),
|
||||
tr("Automatically loads and applies cheats on game start."));
|
||||
dialog->registerWidgetHelp(m_ui.hostFilesystem, tr("Enable Host Filesystem"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.hostFilesystem, tr("Enable Host Filesystem"), tr("Unchecked"),
|
||||
tr("Allows games and homebrew to access files / folders directly on the host computer."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.optimalFramePacing, tr("Optimal Frame Pacing"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.optimalFramePacing, tr("Optimal Frame Pacing"), tr("Unchecked"),
|
||||
tr("Sets the VSync queue size to 0, making every frame be completed and presented by the GS before input is polled and the next frame begins. "
|
||||
"Using this setting can reduce input lag at the cost of measurably higher CPU and GPU requirements."));
|
||||
dialog->registerWidgetHelp(m_ui.maxFrameLatency, tr("Maximum Frame Latency"), tr("2 Frames"),
|
||||
dialog()->registerWidgetHelp(m_ui.maxFrameLatency, tr("Maximum Frame Latency"), tr("2 Frames"),
|
||||
tr("Sets the maximum number of frames that can be queued up to the GS, before the CPU thread will wait for one of them to complete before continuing. "
|
||||
"Higher values can assist with smoothing out irregular frame times, but increase input lag."));
|
||||
dialog->registerWidgetHelp(m_ui.syncToHostRefreshRate, tr("Sync to Host Refresh Rate"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.syncToHostRefreshRate, tr("Sync to Host Refresh Rate"), tr("Unchecked"),
|
||||
tr("Speeds up emulation so that the guest refresh rate matches the host. This results in the smoothest animations possible, at the cost of "
|
||||
"potentially increasing the emulation speed by less than 1%. Sync to Host Refresh Rate will not take effect if "
|
||||
"the console's refresh rate is too far from the host's refresh rate. Users with variable refresh rate displays "
|
||||
"should disable this option."));
|
||||
dialog->registerWidgetHelp(m_ui.vsync, tr("Vertical Sync (VSync)"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.vsync, tr("Vertical Sync (VSync)"), tr("Unchecked"),
|
||||
tr("Enable this option to match PCSX2's refresh rate with your current monitor or screen. VSync is automatically disabled when "
|
||||
"it is not possible (e.g., running at non-100% speed)."));
|
||||
dialog->registerWidgetHelp(m_ui.useVSyncForTiming, tr("Use Host VSync Timing"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.useVSyncForTiming, tr("Use Host VSync Timing"), tr("Unchecked"),
|
||||
tr("When synchronizing with the host refresh rate, this option disables PCSX2's internal frame timing and uses the host instead. "
|
||||
"Can result in smoother frame pacing, <strong>but at the cost of increased input latency</strong>."));
|
||||
dialog->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Unchecked"),
|
||||
tr("Detects when idle frames are being presented in 25/30fps games, and skips presenting those frames. The frame is still "
|
||||
"rendered, it just means the GPU has more time to complete it (this is NOT frame skipping). Can smooth out frame time "
|
||||
"fluctuations when the CPU/GPU are near maximum utilization, but makes frame pacing more inconsistent and can increase "
|
||||
"input lag. Helps when using frame generation on 25/30fps games."));
|
||||
dialog->registerWidgetHelp(m_ui.manuallySetRealTimeClock, tr("Manually Set Real-Time Clock"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.manuallySetRealTimeClock, tr("Manually Set Real-Time Clock"), tr("Unchecked"),
|
||||
tr("Manually set a real-time clock to use for the virtual PlayStation 2 instead of using your OS' system clock."));
|
||||
dialog->registerWidgetHelp(m_ui.rtcDateTime, tr("Real-Time Clock"), tr("Current date and time"),
|
||||
dialog()->registerWidgetHelp(m_ui.rtcDateTime, tr("Real-Time Clock"), tr("Current date and time"),
|
||||
tr("Real-time clock (RTC) used by the virtual PlayStation 2. Date format is the same as the one used by your OS. "
|
||||
"This time is only applied upon booting the PS2; changing it while in-game will have no effect. "
|
||||
"NOTE: This assumes you have your PS2 set to the default timezone of GMT+0 and default DST of Summer Time. "
|
||||
|
|
@ -177,10 +173,10 @@ EmulationSettingsWidget::~EmulationSettingsWidget() = default;
|
|||
void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* section, const char* key, float default_value)
|
||||
{
|
||||
float value = Host::GetBaseFloatSettingValue(section, key, default_value);
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
cb->addItem(tr("Use Global Setting [%1%]").arg(value * 100.0f, 0, 'f', 0));
|
||||
if (!m_dialog->getSettingsInterface()->GetFloatValue(section, key, &value))
|
||||
if (!dialog()->getSettingsInterface()->GetFloatValue(section, key, &value))
|
||||
{
|
||||
// set to something without data
|
||||
value = -1.0f;
|
||||
|
|
@ -236,10 +232,10 @@ void EmulationSettingsWidget::handleSpeedComboChange(QComboBox* cb, const char*
|
|||
if (!ok)
|
||||
{
|
||||
// we need to set back to the old value
|
||||
float value = m_dialog->getEffectiveFloatValue(section, key, 1.0f);
|
||||
float value = dialog()->getEffectiveFloatValue(section, key, 1.0f);
|
||||
|
||||
QSignalBlocker sb(cb);
|
||||
if (m_dialog->isPerGameSettings() && !m_dialog->getSettingsInterface()->GetFloatValue(section, key, &value))
|
||||
if (dialog()->isPerGameSettings() && !dialog()->getSettingsInterface()->GetFloatValue(section, key, &value))
|
||||
cb->setCurrentIndex(0);
|
||||
else if (const int index = cb->findData(QVariant(value)); index >= 0)
|
||||
cb->setCurrentIndex(index);
|
||||
|
|
@ -253,12 +249,12 @@ void EmulationSettingsWidget::handleSpeedComboChange(QComboBox* cb, const char*
|
|||
.arg((50 * custom_value) / 100));
|
||||
new_value = static_cast<float>(custom_value / 100.0);
|
||||
}
|
||||
else if (current_index > 0 || !m_dialog->isPerGameSettings())
|
||||
else if (current_index > 0 || !dialog()->isPerGameSettings())
|
||||
{
|
||||
new_value = cb->currentData().toFloat();
|
||||
}
|
||||
|
||||
m_dialog->setFloatSettingValue(section, key, new_value);
|
||||
dialog()->setFloatSettingValue(section, key, new_value);
|
||||
}
|
||||
|
||||
void EmulationSettingsWidget::onOptimalFramePacingChanged()
|
||||
|
|
@ -274,15 +270,15 @@ void EmulationSettingsWidget::onOptimalFramePacingChanged()
|
|||
}
|
||||
else
|
||||
{
|
||||
value = m_dialog->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
|
||||
value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
|
||||
optimal = (value == 0);
|
||||
}
|
||||
|
||||
m_ui.maxFrameLatency->setMinimum(optimal ? 0 : 1);
|
||||
m_ui.maxFrameLatency->setValue(optimal ? 0 : DEFAULT_FRAME_LATENCY);
|
||||
m_ui.maxFrameLatency->setEnabled(!m_dialog->isPerGameSettings() && !m_ui.optimalFramePacing->isChecked());
|
||||
m_ui.maxFrameLatency->setEnabled(!dialog()->isPerGameSettings() && !m_ui.optimalFramePacing->isChecked());
|
||||
|
||||
m_dialog->setIntSettingValue("EmuCore/GS", "VsyncQueueSize", value);
|
||||
dialog()->setIntSettingValue("EmuCore/GS", "VsyncQueueSize", value);
|
||||
}
|
||||
|
||||
void EmulationSettingsWidget::updateOptimalFramePacing()
|
||||
|
|
@ -290,9 +286,9 @@ void EmulationSettingsWidget::updateOptimalFramePacing()
|
|||
const QSignalBlocker sb(m_ui.optimalFramePacing);
|
||||
const QSignalBlocker sb2(m_ui.maxFrameLatency);
|
||||
|
||||
int value = m_dialog->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
|
||||
int value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
|
||||
bool optimal = (value == 0);
|
||||
if (m_dialog->isPerGameSettings() && !m_dialog->getSettingsInterface()->GetIntValue("EmuCore/GS", "VsyncQueueSize", &value))
|
||||
if (dialog()->isPerGameSettings() && !dialog()->getSettingsInterface()->GetIntValue("EmuCore/GS", "VsyncQueueSize", &value))
|
||||
{
|
||||
m_ui.optimalFramePacing->setCheckState(Qt::PartiallyChecked);
|
||||
m_ui.maxFrameLatency->setEnabled(false);
|
||||
|
|
@ -309,13 +305,13 @@ void EmulationSettingsWidget::updateOptimalFramePacing()
|
|||
|
||||
void EmulationSettingsWidget::updateUseVSyncForTimingEnabled()
|
||||
{
|
||||
const bool vsync = m_dialog->getEffectiveBoolValue("EmuCore/GS", "VsyncEnable", false);
|
||||
const bool sync_to_host_refresh = m_dialog->getEffectiveBoolValue("EmuCore/GS", "SyncToHostRefreshRate", false);
|
||||
const bool vsync = dialog()->getEffectiveBoolValue("EmuCore/GS", "VsyncEnable", false);
|
||||
const bool sync_to_host_refresh = dialog()->getEffectiveBoolValue("EmuCore/GS", "SyncToHostRefreshRate", false);
|
||||
m_ui.useVSyncForTiming->setEnabled(vsync && sync_to_host_refresh);
|
||||
}
|
||||
|
||||
void EmulationSettingsWidget::onManuallySetRealTimeClockChanged()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore", "ManuallySetRealTimeClock", false);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore", "ManuallySetRealTimeClock", false);
|
||||
m_ui.rtcDateTime->setEnabled(enabled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_EmulationSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class EmulationSettingsWidget : public QWidget
|
||||
class EmulationSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
EmulationSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~EmulationSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
@ -27,7 +25,5 @@ private:
|
|||
void updateUseVSyncForTimingEnabled();
|
||||
void onManuallySetRealTimeClockChanged();
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
|
||||
Ui::EmulationSettingsWidget m_ui;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <algorithm>
|
||||
|
||||
#include "FolderSettingsWidget.h"
|
||||
#include "pcsx2/GS/GS.h"
|
||||
#include "SettingWidgetBinder.h"
|
||||
#include "SettingsWindow.h"
|
||||
|
||||
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
m_ui.setupUi(this);
|
||||
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cache, m_ui.cacheBrowse, m_ui.cacheOpen, m_ui.cacheReset, "Folders", "Cache", Path::Combine(EmuFolders::DataRoot, "cache"));
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cheats, m_ui.cheatsBrowse, m_ui.cheatsOpen, m_ui.cheatsReset, "Folders", "Cheats", Path::Combine(EmuFolders::DataRoot, "cheats"));
|
||||
|
|
@ -26,7 +25,7 @@ FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* pare
|
|||
});
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.saveStates, m_ui.saveStatesBrowse, m_ui.saveStatesOpen, m_ui.saveStatesReset, "Folders", "SaveStates", Path::Combine(EmuFolders::DataRoot, "sstates"));
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.videoDumpingDirectory, m_ui.videoDumpingDirectoryBrowse, m_ui.videoDumpingDirectoryOpen, m_ui.videoDumpingDirectoryReset, "Folders", "Videos", Path::Combine(EmuFolders::DataRoot, "videos"));
|
||||
dialog->registerWidgetHelp(m_ui.organizeScreenshotsByGame, tr("Organize Screenshots by Game"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.organizeScreenshotsByGame, tr("Organize Screenshots by Game"), tr("Unchecked"),
|
||||
tr("When enabled, screenshots will be saved in a folder with the game's name, instead of all being saved in the Snapshots folder"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_FolderSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class FolderSettingsWidget : public QWidget
|
||||
class FolderSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
|||
|
|
@ -6,175 +6,123 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>648</width>
|
||||
<height>487</height>
|
||||
<width>600</width>
|
||||
<height>686</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>665</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="cacheGroup">
|
||||
<property name="title">
|
||||
<string>Cache Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="cache"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cacheBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="cacheOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="cacheReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="cacheLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing shaders, game list, and achievement data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="saveStatesGroup">
|
||||
<property name="title">
|
||||
<string>Save States Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="saveStatesLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing save states.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="saveStatesBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="saveStatesReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="saveStates"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="saveStatesOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="cheatsGroup">
|
||||
<property name="title">
|
||||
<string>Cheats Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="cheats"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cheatsBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="cheatsOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="cheatsReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="cheatsLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing .pnach files containing game cheats.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="snapshotsGroup">
|
||||
<property name="title">
|
||||
<string>Snapshots Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="snapshots"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="snapshotsBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="snapshotsOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="snapshotsReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="snaphotsLabel">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="cacheGroup">
|
||||
<property name="title">
|
||||
<string>Cache Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="cache"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cacheBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="cacheOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="cacheReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="cacheLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing shaders, game list, and achievement data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="cheatsGroup">
|
||||
<property name="title">
|
||||
<string>Cheats Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="cheats"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cheatsBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="cheatsOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="cheatsReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="cheatsLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing .pnach files containing game cheats.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="snapshotsGroup">
|
||||
<property name="title">
|
||||
<string>Snapshots Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="snapshots"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="snapshotsBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="snapshotsOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="snapshotsReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="snaphotsLabel">
|
||||
<property name="text">
|
||||
<string>Used for screenshots and saving GS dumps.</string>
|
||||
</property>
|
||||
|
|
@ -188,90 +136,126 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="coversGroup">
|
||||
<property name="title">
|
||||
<string>Covers Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="covers"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="coversBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="coversOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="coversReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="coversLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing covers in the game grid/Big Picture UIs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="videoDumpDirectory">
|
||||
<property name="title">
|
||||
<string>Video Dumping Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLineEdit" name="videoDumpingDirectory"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="videoDumpLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing video captures.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="saveStatesGroup">
|
||||
<property name="title">
|
||||
<string>Save States Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="saveStatesLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing save states.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="saveStatesBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="saveStatesReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="saveStates"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="saveStatesOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="coversGroup">
|
||||
<property name="title">
|
||||
<string>Covers Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="covers"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="coversBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="coversOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="coversReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="coversLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing covers in the game grid/Big Picture UIs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="videoDumpDirectory">
|
||||
<property name="title">
|
||||
<string>Video Dumping Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLineEdit" name="videoDumpingDirectory"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="videoDumpingDirectoryReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="videoDumpLabel">
|
||||
<property name="text">
|
||||
<string>Used for storing video captures.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#include <QtCore/QSortFilterProxyModel>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: m_dialog(dialog)
|
||||
GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
m_model = new QStandardItemModel(this);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
|
||||
m_ui.cheatList->expandAll();
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCheats, "EmuCore", "EnableCheats", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.allCRCsCheckbox, "EmuCore", "ShowCheatsForAllCRCs", false);
|
||||
updateListEnabled();
|
||||
|
|
@ -56,9 +56,9 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
m_model_proxy->setFilterFixedString(text);
|
||||
m_ui.cheatList->expandAll();
|
||||
});
|
||||
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
|
||||
connect(dialog(), &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
|
||||
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
|
||||
}
|
||||
|
||||
|
|
@ -120,18 +120,18 @@ void GameCheatSettingsWidget::onReloadClicked()
|
|||
|
||||
void GameCheatSettingsWidget::updateListEnabled()
|
||||
{
|
||||
const bool cheats_enabled = m_dialog->getEffectiveBoolValue("EmuCore", "EnableCheats", false);
|
||||
const bool cheats_enabled = dialog()->getEffectiveBoolValue("EmuCore", "EnableCheats", false);
|
||||
m_ui.cheatList->setEnabled(cheats_enabled);
|
||||
m_ui.enableAll->setEnabled(cheats_enabled);
|
||||
m_ui.disableAll->setEnabled(cheats_enabled);
|
||||
m_ui.reloadCheats->setEnabled(cheats_enabled);
|
||||
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !m_dialog->getSerial().empty());
|
||||
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !dialog()->getSerial().empty());
|
||||
m_ui.searchText->setEnabled(cheats_enabled);
|
||||
}
|
||||
|
||||
void GameCheatSettingsWidget::disableAllCheats()
|
||||
{
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* si = dialog()->getSettingsInterface();
|
||||
si->ClearSection(Patch::CHEATS_CONFIG_SECTION);
|
||||
si->Save();
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ void GameCheatSettingsWidget::resizeEvent(QResizeEvent* event)
|
|||
|
||||
void GameCheatSettingsWidget::setCheatEnabled(std::string name, bool enabled, bool save_and_reload_settings)
|
||||
{
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* si = dialog()->getSettingsInterface();
|
||||
auto it = std::find(m_enabled_patches.begin(), m_enabled_patches.end(), name);
|
||||
|
||||
if (enabled)
|
||||
|
|
@ -173,7 +173,7 @@ void GameCheatSettingsWidget::setStateForAll(bool enabled)
|
|||
disconnect(m_model, &QStandardItemModel::itemChanged, this, &GameCheatSettingsWidget::onCheatListItemChanged);
|
||||
|
||||
setStateRecursively(nullptr, enabled);
|
||||
m_dialog->getSettingsInterface()->Save();
|
||||
dialog()->getSettingsInterface()->Save();
|
||||
g_emu_thread->reloadGameSettings();
|
||||
|
||||
connect(m_model, &QStandardItemModel::itemChanged, this, &GameCheatSettingsWidget::onCheatListItemChanged);
|
||||
|
|
@ -205,13 +205,13 @@ void GameCheatSettingsWidget::reloadList()
|
|||
{
|
||||
u32 num_unlabelled_codes = 0;
|
||||
bool showAllCRCS = m_ui.allCRCsCheckbox->isChecked();
|
||||
m_patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), true, showAllCRCS, &num_unlabelled_codes);
|
||||
m_patches = Patch::GetPatchInfo(dialog()->getSerial(), dialog()->getDiscCRC(), true, showAllCRCS, &num_unlabelled_codes);
|
||||
m_enabled_patches =
|
||||
m_dialog->getSettingsInterface()->GetStringList(Patch::CHEATS_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
dialog()->getSettingsInterface()->GetStringList(Patch::CHEATS_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
|
||||
m_parent_map.clear();
|
||||
m_model->removeRows(0, m_model->rowCount());
|
||||
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty() && m_ui.cheatList->isEnabled());
|
||||
m_ui.allCRCsCheckbox->setEnabled(!dialog()->getSerial().empty() && m_ui.cheatList->isEnabled());
|
||||
|
||||
for (const Patch::PatchInfo& pi : m_patches)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include "ui_GameCheatSettingsWidget.h"
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
#include "pcsx2/Patch.h"
|
||||
|
||||
#include "common/HeterogeneousContainers.h"
|
||||
|
|
@ -21,14 +23,12 @@ namespace GameList
|
|||
struct Entry;
|
||||
}
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class GameCheatSettingsWidget : public QWidget
|
||||
class GameCheatSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
GameCheatSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~GameCheatSettingsWidget();
|
||||
|
||||
void disableAllCheats();
|
||||
|
|
@ -51,7 +51,6 @@ private:
|
|||
void setStateRecursively(QStandardItem* parent, bool enabled);
|
||||
|
||||
Ui::GameCheatSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
QStandardItemModel* m_model = nullptr;
|
||||
QSortFilterProxyModel* m_model_proxy = nullptr;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
#include "SettingWidgetBinder.h"
|
||||
#include "SettingsWindow.h"
|
||||
|
||||
GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.FpuMulHack, "EmuCore/Gamefixes", "FpuMulHack", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.GoemonTlbHack, "EmuCore/Gamefixes", "GoemonTlbHack", false);
|
||||
|
|
@ -36,24 +36,24 @@ GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* dialog, QWidget* pa
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.XgKickHack, "EmuCore/Gamefixes", "XgKickHack", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.BlitInternalFPSHack, "EmuCore/Gamefixes", "BlitInternalFPSHack", false);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.FpuMulHack, tr("FPU Multiply Hack"), tr("Unchecked"), tr("For Tales of Destiny."));
|
||||
dialog->registerWidgetHelp(m_ui.GoemonTlbHack, tr("Preload TLB Hack"), tr("Unchecked"), tr("To avoid TLB miss on Goemon."));
|
||||
dialog->registerWidgetHelp(m_ui.SoftwareRendererFMVHack, tr("Use Software Renderer For FMVs"), tr("Unchecked"), tr("Needed for some games with complex FMV rendering."));
|
||||
dialog->registerWidgetHelp(m_ui.SkipMPEGHack, tr("Skip MPEG Hack"), tr("Unchecked"), tr("Skips videos/FMVs in games to avoid game hanging/freezes."));
|
||||
dialog->registerWidgetHelp(m_ui.OPHFlagHack, tr("OPH Flag Hack"), tr("Unchecked"), tr("Known to affect following games: Bleach Blade Battlers, Growlanser II and III, Wizardry."));
|
||||
dialog->registerWidgetHelp(m_ui.EETimingHack, tr("EE Timing Hack"), tr("Unchecked"), tr("General-purpose timing hack. Known to affect following games: Digital Devil Saga, SSX."));
|
||||
dialog->registerWidgetHelp(m_ui.InstantDMAHack, tr("Instant DMA Hack"), tr("Unchecked"), tr("Good for cache emulation problems. Known to affect following games: Fire Pro Wrestling Z."));
|
||||
dialog->registerWidgetHelp(m_ui.DMABusyHack, tr("DMA Busy Hack"), tr("Unchecked"), tr("Known to affect following games: Mana Khemia 1, Metal Saga, Pilot Down Behind Enemy Lines."));
|
||||
dialog->registerWidgetHelp(m_ui.GIFFIFOHack, tr("Emulate GIF FIFO"), tr("Unchecked"), tr("Correct but slower. Known to affect the following games: Fifa Street 2."));
|
||||
dialog->registerWidgetHelp(m_ui.VIFFIFOHack, tr("Emulate VIF FIFO"), tr("Unchecked"), tr("Simulate VIF1 FIFO read ahead. Known to affect following games: Test Drive Unlimited, Transformers."));
|
||||
dialog->registerWidgetHelp(m_ui.VIF1StallHack, tr("Delay VIF1 Stalls"), tr("Unchecked"), tr("For SOCOM 2 HUD and Spy Hunter loading hang."));
|
||||
dialog->registerWidgetHelp(m_ui.VuAddSubHack, tr("VU Add Hack"), tr("Unchecked"), tr("For Tri-Ace Games: Star Ocean 3, Radiata Stories, Valkyrie Profile 2."));
|
||||
dialog->registerWidgetHelp(m_ui.IbitHack, tr("VU I Bit Hack"), tr("Unchecked"), tr("Avoids constant recompilation in some games. Known to affect the following games: Scarface The World is Yours, Crash Tag Team Racing."));
|
||||
dialog->registerWidgetHelp(m_ui.FullVU0SyncHack, tr("Full VU0 Synchronization"), tr("Unchecked"), tr("Forces tight VU0 sync on every COP2 instruction."));
|
||||
dialog->registerWidgetHelp(m_ui.VUSyncHack, tr("VU Sync"), tr("Unchecked"), tr("Run behind. To avoid sync problems when reading or writing VU registers."));
|
||||
dialog->registerWidgetHelp(m_ui.VUOverflowHack, tr("VU Overflow Hack"), tr("Unchecked"), tr("To check for possible float overflows (Superman Returns)."));
|
||||
dialog->registerWidgetHelp(m_ui.XgKickHack, tr("VU XGKick Sync"), tr("Unchecked"), tr("Use accurate timing for VU XGKicks (slower)."));
|
||||
dialog->registerWidgetHelp(m_ui.BlitInternalFPSHack, tr("Force Blit Internal FPS Detection"), tr("Unchecked"), tr("Use alternative method to calculate internal FPS to avoid false readings in some games."));
|
||||
dialog()->registerWidgetHelp(m_ui.FpuMulHack, tr("FPU Multiply Hack"), tr("Unchecked"), tr("For Tales of Destiny."));
|
||||
dialog()->registerWidgetHelp(m_ui.GoemonTlbHack, tr("Preload TLB Hack"), tr("Unchecked"), tr("To avoid TLB miss on Goemon."));
|
||||
dialog()->registerWidgetHelp(m_ui.SoftwareRendererFMVHack, tr("Use Software Renderer For FMVs"), tr("Unchecked"), tr("Needed for some games with complex FMV rendering."));
|
||||
dialog()->registerWidgetHelp(m_ui.SkipMPEGHack, tr("Skip MPEG Hack"), tr("Unchecked"), tr("Skips videos/FMVs in games to avoid game hanging/freezes."));
|
||||
dialog()->registerWidgetHelp(m_ui.OPHFlagHack, tr("OPH Flag Hack"), tr("Unchecked"), tr("Known to affect following games: Bleach Blade Battlers, Growlanser II and III, Wizardry."));
|
||||
dialog()->registerWidgetHelp(m_ui.EETimingHack, tr("EE Timing Hack"), tr("Unchecked"), tr("General-purpose timing hack. Known to affect following games: Digital Devil Saga, SSX."));
|
||||
dialog()->registerWidgetHelp(m_ui.InstantDMAHack, tr("Instant DMA Hack"), tr("Unchecked"), tr("Good for cache emulation problems. Known to affect following games: Fire Pro Wrestling Z."));
|
||||
dialog()->registerWidgetHelp(m_ui.DMABusyHack, tr("DMA Busy Hack"), tr("Unchecked"), tr("Known to affect following games: Mana Khemia 1, Metal Saga, Pilot Down Behind Enemy Lines."));
|
||||
dialog()->registerWidgetHelp(m_ui.GIFFIFOHack, tr("Emulate GIF FIFO"), tr("Unchecked"), tr("Correct but slower. Known to affect the following games: Fifa Street 2."));
|
||||
dialog()->registerWidgetHelp(m_ui.VIFFIFOHack, tr("Emulate VIF FIFO"), tr("Unchecked"), tr("Simulate VIF1 FIFO read ahead. Known to affect following games: Test Drive Unlimited, Transformers."));
|
||||
dialog()->registerWidgetHelp(m_ui.VIF1StallHack, tr("Delay VIF1 Stalls"), tr("Unchecked"), tr("For SOCOM 2 HUD and Spy Hunter loading hang."));
|
||||
dialog()->registerWidgetHelp(m_ui.VuAddSubHack, tr("VU Add Hack"), tr("Unchecked"), tr("For Tri-Ace Games: Star Ocean 3, Radiata Stories, Valkyrie Profile 2."));
|
||||
dialog()->registerWidgetHelp(m_ui.IbitHack, tr("VU I Bit Hack"), tr("Unchecked"), tr("Avoids constant recompilation in some games. Known to affect the following games: Scarface The World is Yours, Crash Tag Team Racing."));
|
||||
dialog()->registerWidgetHelp(m_ui.FullVU0SyncHack, tr("Full VU0 Synchronization"), tr("Unchecked"), tr("Forces tight VU0 sync on every COP2 instruction."));
|
||||
dialog()->registerWidgetHelp(m_ui.VUSyncHack, tr("VU Sync"), tr("Unchecked"), tr("Run behind. To avoid sync problems when reading or writing VU registers."));
|
||||
dialog()->registerWidgetHelp(m_ui.VUOverflowHack, tr("VU Overflow Hack"), tr("Unchecked"), tr("To check for possible float overflows (Superman Returns)."));
|
||||
dialog()->registerWidgetHelp(m_ui.XgKickHack, tr("VU XGKick Sync"), tr("Unchecked"), tr("Use accurate timing for VU XGKicks (slower)."));
|
||||
dialog()->registerWidgetHelp(m_ui.BlitInternalFPSHack, tr("Force Blit Internal FPS Detection"), tr("Unchecked"), tr("Use alternative method to calculate internal FPS to avoid false readings in some games."));
|
||||
}
|
||||
|
||||
GameFixSettingsWidget::~GameFixSettingsWidget() = default;
|
||||
|
|
|
|||
|
|
@ -3,18 +3,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_GameFixSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class GameFixSettingsWidget : public QWidget
|
||||
class GameFixSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
GameFixSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~GameFixSettingsWidget();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -6,202 +6,159 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>676</width>
|
||||
<height>535</height>
|
||||
<width>600</width>
|
||||
<height>641</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Game Fixes</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>674</width>
|
||||
<height>533</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Game Fixes</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="FpuMulHack">
|
||||
<property name="text">
|
||||
<string extracomment="FPU = Floating Point Unit. A part of the PS2's CPU. Do not translate.\nMultiply: mathematical term.\nTales of Destiny: a game's name. Leave as-is or use an official translation.">FPU Multiply Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
|
||||
<property name="text">
|
||||
<string extracomment="FMV: Full Motion Video. Find the common used term in your language.">Use Software Renderer For FMVs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="SkipMPEGHack">
|
||||
<property name="text">
|
||||
<string extracomment="MPEG: video codec, leave as-is. FMV: Full Motion Video. Find the common used term in your language.">Skip MPEG Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="GoemonTlbHack">
|
||||
<property name="text">
|
||||
<string extracomment="TLB: Translation Lookaside Buffer. Leave as-is. Goemon: name of a character from the series with his name. Leave as-is or use an official translation.">Preload TLB Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="EETimingHack">
|
||||
<property name="text">
|
||||
<string extracomment="EE: Emotion Engine. Leave as-is.">EE Timing Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="InstantDMAHack">
|
||||
<property name="text">
|
||||
<string extracomment="DMA: Direct Memory Access. Leave as-is.">Instant DMA Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="OPHFlagHack">
|
||||
<property name="text">
|
||||
<string extracomment="OPH: Name of a flag (Output PatH) in the GIF_STAT register in the EE. Leave as-is.\nBleach Blade Battles: a game's name. Leave as-is or use an official translation.">OPH Flag Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="GIFFIFOHack">
|
||||
<property name="text">
|
||||
<string extracomment="GIF = GS (Graphics Synthesizer, the GPU) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate GIF FIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="DMABusyHack">
|
||||
<property name="text">
|
||||
<string extracomment="DMA: Direct Memory Access. Leave as-is.">DMA Busy Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VIF1StallHack">
|
||||
<property name="text">
|
||||
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is. SOCOM 2 and Spy Hunter: names of two different games. Leave as-is or use an official translation.\nHUD = Heads-Up Display. The games' interfaces.">Delay VIF1 Stalls</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VIFFIFOHack">
|
||||
<property name="text">
|
||||
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate VIF FIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="FullVU0SyncHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU0 = VU (Vector Unit) 0. Leave as-is.">Full VU0 Synchronization</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="IbitHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nI Bit = A bit referred as I, not as 1.\nScarface The World is Yours and Crash Tag Team Racing: names of two different games. Leave as-is or use an official translation.">VU I Bit Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VuAddSubHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nTri-Ace: a game development company name. Leave as-is.">VU Add Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VUOverflowHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nSuperman Returns: a game's name. Leave as-is or use an official translation.">VU Overflow Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VUSyncHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nRun Behind: watch out for misleading capitalization for non-English: this refers to making the VUs run behind (delayed relative to) the EE.\nM-Bit: a bitflag in VU instructions that tells VU0 to synchronize with the EE. M-Bit Game: A game that uses instructions with the M-Bit enabled (unofficial PCSX2 name).">VU Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="XgKickHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nXGKick: the name of one of the VU's instructions. Leave as-is.">VU XGKick Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="BlitInternalFPSHack">
|
||||
<property name="text">
|
||||
<string extracomment="Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit This option tells PCSX2 to estimate internal FPS by detecting blits (image copies) onto visible display memory.">Force Blit Internal FPS Detection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="FpuMulHack">
|
||||
<property name="text">
|
||||
<string extracomment="FPU = Floating Point Unit. A part of the PS2's CPU. Do not translate.\nMultiply: mathematical term.\nTales of Destiny: a game's name. Leave as-is or use an official translation.">FPU Multiply Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
|
||||
<property name="text">
|
||||
<string extracomment="FMV: Full Motion Video. Find the common used term in your language.">Use Software Renderer For FMVs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="SkipMPEGHack">
|
||||
<property name="text">
|
||||
<string extracomment="MPEG: video codec, leave as-is. FMV: Full Motion Video. Find the common used term in your language.">Skip MPEG Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="GoemonTlbHack">
|
||||
<property name="text">
|
||||
<string extracomment="TLB: Translation Lookaside Buffer. Leave as-is. Goemon: name of a character from the series with his name. Leave as-is or use an official translation.">Preload TLB Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="EETimingHack">
|
||||
<property name="text">
|
||||
<string extracomment="EE: Emotion Engine. Leave as-is.">EE Timing Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="InstantDMAHack">
|
||||
<property name="text">
|
||||
<string extracomment="DMA: Direct Memory Access. Leave as-is.">Instant DMA Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="OPHFlagHack">
|
||||
<property name="text">
|
||||
<string extracomment="OPH: Name of a flag (Output PatH) in the GIF_STAT register in the EE. Leave as-is.\nBleach Blade Battles: a game's name. Leave as-is or use an official translation.">OPH Flag Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="GIFFIFOHack">
|
||||
<property name="text">
|
||||
<string extracomment="GIF = GS (Graphics Synthesizer, the GPU) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate GIF FIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="DMABusyHack">
|
||||
<property name="text">
|
||||
<string extracomment="DMA: Direct Memory Access. Leave as-is.">DMA Busy Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VIF1StallHack">
|
||||
<property name="text">
|
||||
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is. SOCOM 2 and Spy Hunter: names of two different games. Leave as-is or use an official translation.\nHUD = Heads-Up Display. The games' interfaces.">Delay VIF1 Stalls</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VIFFIFOHack">
|
||||
<property name="text">
|
||||
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate VIF FIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="FullVU0SyncHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU0 = VU (Vector Unit) 0. Leave as-is.">Full VU0 Synchronization</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="IbitHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nI Bit = A bit referred as I, not as 1.\nScarface The World is Yours and Crash Tag Team Racing: names of two different games. Leave as-is or use an official translation.">VU I Bit Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VuAddSubHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nTri-Ace: a game development company name. Leave as-is.">VU Add Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VUOverflowHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nSuperman Returns: a game's name. Leave as-is or use an official translation.">VU Overflow Hack</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VUSyncHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nRun Behind: watch out for misleading capitalization for non-English: this refers to making the VUs run behind (delayed relative to) the EE.\nM-Bit: a bitflag in VU instructions that tells VU0 to synchronize with the EE. M-Bit Game: A game that uses instructions with the M-Bit enabled (unofficial PCSX2 name).">VU Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="XgKickHack">
|
||||
<property name="text">
|
||||
<string extracomment="VU = Vector Unit. Leave as-is.\nXGKick: the name of one of the VU's instructions. Leave as-is.">VU XGKick Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="BlitInternalFPSHack">
|
||||
<property name="text">
|
||||
<string extracomment="Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit This option tells PCSX2 to estimate internal FPS by detecting blits (image copies) onto visible display memory.">Force Blit Internal FPS Detection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <algorithm>
|
||||
|
||||
#include "GameListSettingsWidget.h"
|
||||
#include "MainWindow.h"
|
||||
|
|
@ -18,17 +17,17 @@
|
|||
#include "QtUtils.h"
|
||||
#include "SettingWidgetBinder.h"
|
||||
|
||||
GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.preferEnglishGameList, "UI", "PreferEnglishGameList", false);
|
||||
connect(m_ui.preferEnglishGameList, &QCheckBox::checkStateChanged, this, [this]{ emit preferEnglishGameListChanged(); });
|
||||
connect(m_ui.preferEnglishGameList, &QCheckBox::checkStateChanged, this, [this] { emit preferEnglishGameListChanged(); });
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.preferEnglishGameList, tr("Prefer English Titles"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.preferEnglishGameList, tr("Prefer English Titles"), tr("Unchecked"),
|
||||
tr("For games with both a title in the game's native language and one in English, prefer the English title."));
|
||||
|
||||
m_ui.searchDirectoryList->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_GameListSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class GameListSettingsWidget : public QWidget
|
||||
#include <string>
|
||||
|
||||
class GameListSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
GameListSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~GameListSettingsWidget();
|
||||
|
||||
bool addExcludedPath(const std::string& path);
|
||||
|
|
|
|||
|
|
@ -65,10 +65,11 @@ void GamePatchDetailsWidget::onEnabledStateChanged(int state)
|
|||
g_emu_thread->reloadGameSettings();
|
||||
}
|
||||
|
||||
GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: m_dialog(dialog)
|
||||
GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
m_ui.scrollArea->setFrameShape(QFrame::WinPanel);
|
||||
m_ui.scrollArea->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
|
|
@ -76,14 +77,14 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
setGlobalWsPatchNoteVisibility(false);
|
||||
setGlobalNiPatchNoteVisibility(false);
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.allCRCsCheckbox, "EmuCore", "ShowPatchesForAllCRCs", false);
|
||||
|
||||
connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked);
|
||||
connect(m_ui.allCRCsCheckbox, &QCheckBox::checkStateChanged, this, &GamePatchSettingsWidget::reloadList);
|
||||
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
|
||||
connect(dialog(), &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
|
||||
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
|
||||
|
||||
reloadList();
|
||||
|
|
@ -101,31 +102,31 @@ void GamePatchSettingsWidget::onReloadClicked()
|
|||
|
||||
void GamePatchSettingsWidget::disableAllPatches()
|
||||
{
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* si = dialog()->getSettingsInterface();
|
||||
si->ClearSection(Patch::PATCHES_CONFIG_SECTION);
|
||||
si->Save();
|
||||
}
|
||||
|
||||
void GamePatchSettingsWidget::reloadList()
|
||||
{
|
||||
const SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
const SettingsInterface* si = dialog()->getSettingsInterface();
|
||||
// Patches shouldn't have any unlabelled patch groups, because they're new.
|
||||
u32 number_of_unlabeled_patches = 0;
|
||||
bool showAllCRCS = m_ui.allCRCsCheckbox->isChecked();
|
||||
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, showAllCRCS, &number_of_unlabeled_patches);
|
||||
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(dialog()->getSerial(), dialog()->getDiscCRC(), false, showAllCRCS, &number_of_unlabeled_patches);
|
||||
std::vector<std::string> enabled_list =
|
||||
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
std::vector<std::string> disabled_list =
|
||||
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY);
|
||||
|
||||
const bool ws_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableWideScreenPatches", false);
|
||||
const bool ni_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableNoInterlacingPatches", false);
|
||||
const bool ws_patches_enabled_globally = dialog()->getEffectiveBoolValue("EmuCore", "EnableWideScreenPatches", false);
|
||||
const bool ni_patches_enabled_globally = dialog()->getEffectiveBoolValue("EmuCore", "EnableNoInterlacingPatches", false);
|
||||
|
||||
setUnlabeledPatchesWarningVisibility(number_of_unlabeled_patches > 0);
|
||||
setGlobalWsPatchNoteVisibility(ws_patches_enabled_globally);
|
||||
setGlobalNiPatchNoteVisibility(ni_patches_enabled_globally);
|
||||
delete m_ui.scrollArea->takeWidget();
|
||||
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty());
|
||||
m_ui.allCRCsCheckbox->setEnabled(!dialog()->getSerial().empty());
|
||||
|
||||
QWidget* container = new QWidget(m_ui.scrollArea);
|
||||
QVBoxLayout* layout = new QVBoxLayout(container);
|
||||
|
|
@ -177,7 +178,7 @@ void GamePatchSettingsWidget::reloadList()
|
|||
}
|
||||
|
||||
GamePatchDetailsWidget* it =
|
||||
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, globally_toggleable_option, check_state, m_dialog, container);
|
||||
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, globally_toggleable_option, check_state, dialog(), container);
|
||||
layout->addWidget(it);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_GamePatchDetailsWidget.h"
|
||||
#include "ui_GamePatchSettingsWidget.h"
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
#include "pcsx2/Patch.h"
|
||||
|
||||
namespace GameList
|
||||
|
|
@ -15,8 +15,6 @@ namespace GameList
|
|||
struct Entry;
|
||||
}
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class GamePatchDetailsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -35,12 +33,12 @@ private:
|
|||
std::string m_name;
|
||||
};
|
||||
|
||||
class GamePatchSettingsWidget : public QWidget
|
||||
class GamePatchSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
GamePatchSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
void disableAllPatches();
|
||||
~GamePatchSettingsWidget();
|
||||
|
||||
|
|
@ -54,5 +52,4 @@ private:
|
|||
void setGlobalNiPatchNoteVisibility(bool visible);
|
||||
|
||||
Ui::GamePatchSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
#include <QtWidgets/QFileDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent)
|
||||
: m_dialog(dialog)
|
||||
GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
const QString base_path(QtHost::GetResourcesBasePath());
|
||||
for (int i = 0; i < m_ui.region->count(); i++)
|
||||
|
|
@ -91,7 +91,7 @@ void GameSummaryWidget::populateDetails(const GameList::Entry* entry)
|
|||
m_ui.detailsFormLayout->getWidgetPosition(m_ui.titleEN, &row, nullptr);
|
||||
m_ui.detailsFormLayout->setRowVisible(row, !entry->title_en.empty());
|
||||
|
||||
std::optional<std::string> profile(m_dialog->getStringValue("EmuCore", "InputProfileName", std::nullopt));
|
||||
std::optional<std::string> profile(dialog()->getStringValue("EmuCore", "InputProfileName", std::nullopt));
|
||||
if (profile.has_value())
|
||||
m_ui.inputProfile->setCurrentIndex(m_ui.inputProfile->findText(QString::fromStdString(profile.value())));
|
||||
else
|
||||
|
|
@ -120,7 +120,7 @@ void GameSummaryWidget::populateDiscPath(const GameList::Entry* entry)
|
|||
{
|
||||
if (entry->type == GameList::EntryType::ELF)
|
||||
{
|
||||
std::optional<std::string> iso_path(m_dialog->getStringValue("EmuCore", "DiscPath", std::nullopt));
|
||||
std::optional<std::string> iso_path(dialog()->getStringValue("EmuCore", "DiscPath", std::nullopt));
|
||||
if (iso_path.has_value() && !iso_path->empty())
|
||||
m_ui.discPath->setText(QString::fromStdString(iso_path.value()));
|
||||
|
||||
|
|
@ -143,17 +143,17 @@ void GameSummaryWidget::populateDiscPath(const GameList::Entry* entry)
|
|||
void GameSummaryWidget::onInputProfileChanged(int index)
|
||||
{
|
||||
if (index == 0)
|
||||
m_dialog->setStringSettingValue("EmuCore", "InputProfileName", std::nullopt);
|
||||
dialog()->setStringSettingValue("EmuCore", "InputProfileName", std::nullopt);
|
||||
else
|
||||
m_dialog->setStringSettingValue("EmuCore", "InputProfileName", m_ui.inputProfile->itemText(index).toUtf8());
|
||||
dialog()->setStringSettingValue("EmuCore", "InputProfileName", m_ui.inputProfile->itemText(index).toUtf8());
|
||||
}
|
||||
|
||||
void GameSummaryWidget::onDiscPathChanged(const QString& value)
|
||||
{
|
||||
if (value.isEmpty())
|
||||
m_dialog->removeSettingValue("EmuCore", "DiscPath");
|
||||
dialog()->removeSettingValue("EmuCore", "DiscPath");
|
||||
else
|
||||
m_dialog->setStringSettingValue("EmuCore", "DiscPath", value.toStdString().c_str());
|
||||
dialog()->setStringSettingValue("EmuCore", "DiscPath", value.toStdString().c_str());
|
||||
|
||||
// force rescan of elf to update the serial
|
||||
g_main_window->rescanFile(m_entry_path);
|
||||
|
|
@ -163,7 +163,7 @@ void GameSummaryWidget::onDiscPathChanged(const QString& value)
|
|||
if (entry)
|
||||
{
|
||||
populateDetails(entry);
|
||||
m_dialog->setSerial(entry->serial);
|
||||
dialog()->setSerial(entry->serial);
|
||||
m_ui.checkWiki->setEnabled(!entry->serial.empty());
|
||||
}
|
||||
}
|
||||
|
|
@ -340,15 +340,15 @@ void GameSummaryWidget::onVerifyClicked()
|
|||
if (!hentry->version.empty())
|
||||
{
|
||||
setVerifyResult(tr("Verified as %1 [%2] (Version %3).")
|
||||
.arg(QString::fromStdString(hentry->name))
|
||||
.arg(QString::fromStdString(hentry->serial))
|
||||
.arg(QString::fromStdString(hentry->version)));
|
||||
.arg(QString::fromStdString(hentry->name))
|
||||
.arg(QString::fromStdString(hentry->serial))
|
||||
.arg(QString::fromStdString(hentry->version)));
|
||||
}
|
||||
else
|
||||
{
|
||||
setVerifyResult(tr("Verified as %1 [%2].")
|
||||
.arg(QString::fromStdString(hentry->name))
|
||||
.arg(QString::fromStdString(hentry->serial)));
|
||||
.arg(QString::fromStdString(hentry->name))
|
||||
.arg(QString::fromStdString(hentry->serial)));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -397,7 +397,7 @@ void GameSummaryWidget::repopulateCurrentDetails()
|
|||
if (entry)
|
||||
{
|
||||
populateDetails(entry);
|
||||
m_dialog->setWindowTitle(QString::fromStdString(entry->title));
|
||||
dialog()->setWindowTitle(QString::fromStdString(entry->title));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,23 +3,21 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_GameSummaryWidget.h"
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
namespace GameList
|
||||
{
|
||||
struct Entry;
|
||||
}
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class GameSummaryWidget : public QWidget
|
||||
class GameSummaryWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent);
|
||||
GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~GameSummaryWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
@ -42,7 +40,6 @@ private:
|
|||
void setCustomRegion(int region);
|
||||
|
||||
Ui::GameSummaryWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
std::string m_entry_path;
|
||||
std::string m_redump_search_keyword;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -54,25 +54,25 @@ static constexpr int DEFAULT_INTERLACE_MODE = 0;
|
|||
static constexpr int DEFAULT_TV_SHADER_MODE = 0;
|
||||
static constexpr int DEFAULT_CAS_SHARPNESS = 50;
|
||||
|
||||
GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: SettingsWidget(dialog, parent)
|
||||
GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
setupHeader(&m_header);
|
||||
m_display_tab = setupTab(tr("Display"), &m_display);
|
||||
m_hardware_rendering_tab = setupTab(tr("Rendering"), &m_hw);
|
||||
m_software_rendering_tab = setupTab(tr("Rendering"), &m_sw);
|
||||
m_hardware_fixes_tab = setupTab(tr("Hardware Fixes"), &m_fixes);
|
||||
m_upscaling_fixes_tab = setupTab(tr("Upscaling Fixes"), &m_upscaling);
|
||||
m_texture_replacement_tab = setupTab(tr("Texture Replacement"), &m_texture);
|
||||
setupTab(tr("Post-Processing"), &m_post);
|
||||
setupTab(tr("OSD"), &m_osd);
|
||||
setupTab(tr("Media Capture"), &m_capture);
|
||||
m_advanced_tab = setupTab(tr("Advanced"), &m_advanced);
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
setupHeader(m_header);
|
||||
m_display_tab = setupTab(m_display, tr("Display"));
|
||||
m_hardware_rendering_tab = setupTab(m_hw, tr("Rendering"));
|
||||
m_software_rendering_tab = setupTab(m_sw, tr("Rendering"));
|
||||
m_hardware_fixes_tab = setupTab(m_fixes, tr("Hardware Fixes"));
|
||||
m_upscaling_fixes_tab = setupTab(m_upscaling, tr("Upscaling Fixes"));
|
||||
m_texture_replacement_tab = setupTab(m_texture, tr("Texture Replacement"));
|
||||
setupTab(m_post, tr("Post-Processing"));
|
||||
setupTab(m_osd, tr("OSD"));
|
||||
setupTab(m_capture, tr("Media Capture"));
|
||||
m_advanced_tab = setupTab(m_advanced, tr("Advanced"));
|
||||
|
||||
#ifndef PCSX2_DEVBUILD
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
// We removed hardware fixes from global settings, but people in the past did set this stuff globally.
|
||||
// So, just reset it all. We can remove this code at some point in the future.
|
||||
|
|
@ -196,7 +196,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
onTextureDumpChanged();
|
||||
onTextureReplacementChanged();
|
||||
|
||||
if (dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_texture.verticalLayout->removeWidget(m_texture.texturesDirectoryBox);
|
||||
m_texture.texturesDirectoryBox->deleteLater();
|
||||
|
|
@ -276,7 +276,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Non-trivial settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
const int renderer = dialog->getEffectiveIntValue("EmuCore/GS", "Renderer", static_cast<int>(GSRendererType::Auto));
|
||||
const int renderer = dialog()->getEffectiveIntValue("EmuCore/GS", "Renderer", static_cast<int>(GSRendererType::Auto));
|
||||
for (const RendererInfo& ri : s_renderer_info)
|
||||
{
|
||||
m_header.rendererDropdown->addItem(qApp->translate("GraphicsSettingsWidget", ri.name));
|
||||
|
|
@ -317,7 +317,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
#endif
|
||||
|
||||
#ifndef PCSX2_DEVBUILD
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
// Only allow disabling readbacks for per-game settings, it's too dangerous.
|
||||
m_advanced.advancedOptionsFormLayout->removeRow(0);
|
||||
|
|
@ -332,9 +332,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
#endif
|
||||
|
||||
// Get rid of widescreen/no-interlace checkboxes from per-game settings, and migrate them to Patches if necessary.
|
||||
if (dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
SettingsInterface* si = dialog->getSettingsInterface();
|
||||
SettingsInterface* si = dialog()->getSettingsInterface();
|
||||
bool needs_save = false;
|
||||
|
||||
if (si->ContainsValue("EmuCore", "EnableWideScreenPatches"))
|
||||
|
|
@ -377,7 +377,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
|
||||
if (needs_save)
|
||||
{
|
||||
dialog->saveAndReloadGameSettings();
|
||||
dialog()->saveAndReloadGameSettings();
|
||||
}
|
||||
|
||||
m_display.displayGridLayout->removeWidget(m_display.widescreenPatches);
|
||||
|
|
@ -440,88 +440,88 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
|
||||
// Display tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_display.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
|
||||
tr("Automatically loads and applies widescreen patches on game start. Can cause issues."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
|
||||
tr("Automatically loads and applies no-interlacing patches on game start. Can cause issues."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.DisableInterlaceOffset, tr("Disable Interlace Offset"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.DisableInterlaceOffset, tr("Disable Interlace Offset"), tr("Unchecked"),
|
||||
tr("Disables interlacing offset which may reduce blurring in some situations."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.bilinearFiltering, tr("Bilinear Filtering"), tr("Bilinear (Smooth)"),
|
||||
dialog()->registerWidgetHelp(m_display.bilinearFiltering, tr("Bilinear Filtering"), tr("Bilinear (Smooth)"),
|
||||
tr("Enables bilinear post processing filter. Smooths the overall picture as it is displayed on the screen. Corrects "
|
||||
"positioning between pixels."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.PCRTCOffsets, tr("Screen Offsets"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.PCRTCOffsets, tr("Screen Offsets"), tr("Unchecked"),
|
||||
//: PCRTC: Programmable CRT (Cathode Ray Tube) Controller.
|
||||
tr("Enables PCRTC Offsets which position the screen as the game requests. Useful for some games such as WipEout Fusion for its "
|
||||
"screen shake effect, but can make the picture blurry."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.PCRTCOverscan, tr("Show Overscan"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.PCRTCOverscan, tr("Show Overscan"), tr("Unchecked"),
|
||||
tr("Enables the option to show the overscan area on games which draw more than the safe area of the screen."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_display.fmvAspectRatio, tr("FMV Aspect Ratio Override"), tr("Off (Default)"),
|
||||
tr("Overrides the full-motion video (FMV) aspect ratio. "
|
||||
"If disabled, the FMV Aspect Ratio will match the same value as the general Aspect Ratio setting."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.PCRTCAntiBlur, tr("Anti-Blur"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_display.PCRTCAntiBlur, tr("Anti-Blur"), tr("Checked"),
|
||||
tr("Enables internal Anti-Blur hacks. Less accurate than PS2 rendering but will make a lot of games look less blurry."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.integerScaling, tr("Integer Scaling"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_display.integerScaling, tr("Integer Scaling"), tr("Unchecked"),
|
||||
tr("Adds padding to the display area to ensure that the ratio between pixels on the host to pixels in the console is an "
|
||||
"integer number. May result in a sharper image in some 2D games."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.aspectRatio, tr("Aspect Ratio"), tr("Auto Standard (4:3/3:2 Progressive)"),
|
||||
dialog()->registerWidgetHelp(m_display.aspectRatio, tr("Aspect Ratio"), tr("Auto Standard (4:3/3:2 Progressive)"),
|
||||
tr("Changes the aspect ratio used to display the console's output to the screen. The default is Auto Standard (4:3/3:2 "
|
||||
"Progressive) which automatically adjusts the aspect ratio to match how a game would be shown on a typical TV of the era, and adapts to widescreen/ultrawide game patches."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.interlacing, tr("Deinterlacing"), tr("Automatic (Default)"), tr("Determines the deinterlacing method to be used on the interlaced screen of the emulated console. Automatic should be able to correctly deinterlace most games, but if you see visibly shaky graphics, try one of the other options."));
|
||||
dialog()->registerWidgetHelp(m_display.interlacing, tr("Deinterlacing"), tr("Automatic (Default)"), tr("Determines the deinterlacing method to be used on the interlaced screen of the emulated console. Automatic should be able to correctly deinterlace most games, but if you see visibly shaky graphics, try one of the other options."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.screenshotSize, tr("Screenshot Resolution"), tr("Screen Resolution"),
|
||||
dialog()->registerWidgetHelp(m_capture.screenshotSize, tr("Screenshot Resolution"), tr("Screen Resolution"),
|
||||
tr("Determines the resolution at which screenshots will be saved. Internal resolutions preserve more detail at the cost of "
|
||||
"file size."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.screenshotFormat, tr("Screenshot Format"), tr("PNG"),
|
||||
dialog()->registerWidgetHelp(m_capture.screenshotFormat, tr("Screenshot Format"), tr("PNG"),
|
||||
tr("Selects the format which will be used to save screenshots. JPEG produces smaller files, but loses detail."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.screenshotQuality, tr("Screenshot Quality"), tr("90%"),
|
||||
dialog()->registerWidgetHelp(m_capture.screenshotQuality, tr("Screenshot Quality"), tr("90%"),
|
||||
tr("Selects the quality at which screenshots will be compressed. Higher values preserve more detail for JPEG and WebP, and reduce file "
|
||||
"size for PNG."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.stretchY, tr("Vertical Stretch"), tr("100%"),
|
||||
dialog()->registerWidgetHelp(m_display.stretchY, tr("Vertical Stretch"), tr("100%"),
|
||||
// Characters </> need to be converted into entities in order to be shown correctly.
|
||||
tr("Stretches (< 100%) or squashes (> 100%) the vertical component of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_display.fullscreenModes, tr("Fullscreen Mode"), tr("Borderless Fullscreen"),
|
||||
dialog()->registerWidgetHelp(m_display.fullscreenModes, tr("Fullscreen Mode"), tr("Borderless Fullscreen"),
|
||||
tr("Chooses the fullscreen resolution and frequency."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_display.cropLeft, tr("Left"), tr("0px"), tr("Changes the number of pixels cropped from the left side of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_display.cropTop, tr("Top"), tr("0px"), tr("Changes the number of pixels cropped from the top of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_display.cropRight, tr("Right"), tr("0px"), tr("Changes the number of pixels cropped from the right side of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_display.cropBottom, tr("Bottom"), tr("0px"), tr("Changes the number of pixels cropped from the bottom of the display."));
|
||||
}
|
||||
|
||||
// Rendering tab
|
||||
{
|
||||
// Hardware
|
||||
dialog->registerWidgetHelp(m_hw.upscaleMultiplier, tr("Internal Resolution"), tr("Native (PS2) (Default)"),
|
||||
dialog()->registerWidgetHelp(m_hw.upscaleMultiplier, tr("Internal Resolution"), tr("Native (PS2) (Default)"),
|
||||
tr("Control the resolution at which games are rendered. High resolutions can impact performance on "
|
||||
"older or lower-end GPUs.<br>Non-native resolution may cause minor graphical issues in some games.<br>"
|
||||
"FMV resolution will remain unchanged, as the video files are pre-rendered."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_hw.mipmapping, tr("Mipmapping"), tr("Checked"), tr("Enables mipmapping, which some games require to render correctly. Mipmapping uses progressively lower resolution variants of textures at progressively further distances to reduce processing load and avoid visual artifacts."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_hw.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"),
|
||||
tr("Changes what filtering algorithm is used to map textures to surfaces.<br> "
|
||||
"Nearest: Makes no attempt to blend colors.<br> "
|
||||
|
|
@ -529,291 +529,291 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
"Bilinear (PS2): Will apply filtering to all surfaces that a game instructs the PS2 to filter.<br> "
|
||||
"Bilinear (Forced Excluding Sprites): Will apply filtering to all surfaces, even if the game told the PS2 not to, except sprites."));
|
||||
|
||||
dialog->registerWidgetHelp(m_hw.trilinearFiltering, tr("Trilinear Filtering"), tr("Automatic (Default)"),
|
||||
dialog()->registerWidgetHelp(m_hw.trilinearFiltering, tr("Trilinear Filtering"), tr("Automatic (Default)"),
|
||||
tr("Reduces blurriness of large textures applied to small, steeply angled surfaces by sampling colors from the two nearest Mipmaps. Requires Mipmapping to be 'on'.<br> "
|
||||
"Off: Disables the feature.<br> "
|
||||
"Trilinear (PS2): Applies Trilinear filtering to all surfaces that a game instructs the PS2 to.<br> "
|
||||
"Trilinear (Forced): Applies Trilinear filtering to all surfaces, even if the game told the PS2 not to."));
|
||||
|
||||
dialog->registerWidgetHelp(m_hw.anisotropicFiltering, tr("Anisotropic Filtering"), tr("Off (Default)"),
|
||||
dialog()->registerWidgetHelp(m_hw.anisotropicFiltering, tr("Anisotropic Filtering"), tr("Off (Default)"),
|
||||
tr("Reduces texture aliasing at extreme viewing angles."));
|
||||
|
||||
dialog->registerWidgetHelp(m_hw.dithering, tr("Dithering"), tr("Unscaled (Default)"),
|
||||
dialog()->registerWidgetHelp(m_hw.dithering, tr("Dithering"), tr("Unscaled (Default)"),
|
||||
tr("Reduces banding between colors and improves the perceived color depth.<br> "
|
||||
"Off: Disables any dithering.<br> "
|
||||
"Scaled: Upscaling-aware / Highest dithering effect.<br> "
|
||||
"Unscaled: Native dithering / Lowest dithering effect, does not increase size of squares when upscaling.<br> "
|
||||
"Force 32bit: Treats all draws as if they were 32bit to avoid banding and dithering."));
|
||||
|
||||
dialog->registerWidgetHelp(m_hw.blending, tr("Blending Accuracy"), tr("Basic (Recommended)"),
|
||||
dialog()->registerWidgetHelp(m_hw.blending, tr("Blending Accuracy"), tr("Basic (Recommended)"),
|
||||
tr("Control the accuracy level of the GS blending unit emulation.<br> "
|
||||
"The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will "
|
||||
"be.<br> "
|
||||
"Note that Direct3D's blending is reduced in capability compared to OpenGL/Vulkan."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.texturePreloading, tr("Texture Preloading"), tr("Full (Hash Cache)"),
|
||||
dialog()->registerWidgetHelp(m_advanced.texturePreloading, tr("Texture Preloading"), tr("Full (Hash Cache)"),
|
||||
tr("Uploads entire textures at once instead of in small pieces, avoiding redundant uploads when possible. "
|
||||
"Improves performance in most games, but can make a small selection slower."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.gpuPaletteConversion, tr("GPU Palette Conversion"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.gpuPaletteConversion, tr("GPU Palette Conversion"), tr("Unchecked"),
|
||||
tr("When enabled the GPU will convert colormap textures, otherwise the CPU will. "
|
||||
"It is a trade-off between GPU and CPU."));
|
||||
|
||||
dialog->registerWidgetHelp(m_hw.enableHWFixes, tr("Manual Hardware Renderer Fixes"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_hw.enableHWFixes, tr("Manual Hardware Renderer Fixes"), tr("Unchecked"),
|
||||
tr("Enabling this option gives you the ability to change the renderer and upscaling fixes "
|
||||
"to your games. However IF you have ENABLED this, you WILL DISABLE AUTOMATIC "
|
||||
"SETTINGS and you can re-enable automatic settings by unchecking this option."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.spinCPUDuringReadbacks, tr("Spin CPU During Readbacks"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.spinCPUDuringReadbacks, tr("Spin CPU During Readbacks"), tr("Unchecked"),
|
||||
tr("Does useless work on the CPU during readbacks to prevent it from going to into powersave modes. "
|
||||
"May improve performance during readbacks but with a significant increase in power usage."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.spinGPUDuringReadbacks, tr("Spin GPU During Readbacks"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.spinGPUDuringReadbacks, tr("Spin GPU During Readbacks"), tr("Unchecked"),
|
||||
tr("Submits useless work to the GPU during readbacks to prevent it from going into powersave modes. "
|
||||
"May improve performance during readbacks but with a significant increase in power usage."));
|
||||
|
||||
// Software
|
||||
dialog->registerWidgetHelp(m_sw.extraSWThreads, tr("Software Rendering Threads"), tr("2 threads"),
|
||||
dialog()->registerWidgetHelp(m_sw.extraSWThreads, tr("Software Rendering Threads"), tr("2 threads"),
|
||||
tr("Number of rendering threads: 0 for single thread, 2 or more for multithread (1 is for debugging). "
|
||||
"2 to 4 threads is recommended, any more than that is likely to be slower instead of faster."));
|
||||
|
||||
dialog->registerWidgetHelp(m_sw.swAutoFlush, tr("Auto Flush"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_sw.swAutoFlush, tr("Auto Flush"), tr("Checked"),
|
||||
tr("Forces a primitive flush when a framebuffer is also an input texture. "
|
||||
"Fixes some processing effects such as the shadows in the Jak series and radiosity in GTA:SA."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_sw.swMipmap, tr("Mipmapping"), tr("Checked"), tr("Enables mipmapping, which some games require to render correctly."));
|
||||
}
|
||||
|
||||
// Hardware Fixes tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_fixes.cpuSpriteRenderBW, tr("CPU Sprite Render Size"), tr("0 (Disabled)"),
|
||||
dialog()->registerWidgetHelp(m_fixes.cpuSpriteRenderBW, tr("CPU Sprite Render Size"), tr("0 (Disabled)"),
|
||||
tr("The maximum target memory width that will allow the CPU Sprite Renderer to activate on."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.cpuCLUTRender, tr("Software CLUT Render"), tr("0 (Disabled)"),
|
||||
dialog()->registerWidgetHelp(m_fixes.cpuCLUTRender, tr("Software CLUT Render"), tr("0 (Disabled)"),
|
||||
tr("Tries to detect when a game is drawing its own color palette and then renders it in software, instead of on the GPU."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.gpuTargetCLUTMode, tr("GPU Target CLUT"), tr("Disabled"),
|
||||
dialog()->registerWidgetHelp(m_fixes.gpuTargetCLUTMode, tr("GPU Target CLUT"), tr("Disabled"),
|
||||
tr("Tries to detect when a game is drawing its own color palette and then renders it on the GPU with special handling."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.skipDrawStart, tr("Skipdraw Range Start"), tr("0"),
|
||||
dialog()->registerWidgetHelp(m_fixes.skipDrawStart, tr("Skipdraw Range Start"), tr("0"),
|
||||
tr("Completely skips drawing surfaces from the surface in the left box up to the surface specified in the box on the right."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.skipDrawEnd, tr("Skipdraw Range End"), tr("0"),
|
||||
dialog()->registerWidgetHelp(m_fixes.skipDrawEnd, tr("Skipdraw Range End"), tr("0"),
|
||||
tr("Completely skips drawing surfaces from the surface in the left box up to the surface specified in the box on the right."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.hwAutoFlush, tr("Auto Flush"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.hwAutoFlush, tr("Auto Flush"), tr("Unchecked"),
|
||||
tr("Forces a primitive flush when a framebuffer is also an input texture. "
|
||||
"Fixes some processing effects such as the shadows in the Jak series and radiosity in GTA:SA."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.disableDepthEmulation, tr("Disable Depth Conversion"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.disableDepthEmulation, tr("Disable Depth Conversion"), tr("Unchecked"),
|
||||
tr("Disables the support of depth buffers in the texture cache. "
|
||||
"Will likely create various glitches and is only useful for debugging."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.disableSafeFeatures, tr("Disable Safe Features"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.disableSafeFeatures, tr("Disable Safe Features"), tr("Unchecked"),
|
||||
tr("This option disables multiple safe features. "
|
||||
"Disables accurate Unscale Point and Line rendering which can help Xenosaga games. "
|
||||
"Disables accurate GS Memory Clearing to be done on the CPU, and lets the GPU handle it, which can help Kingdom Hearts "
|
||||
"games."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_fixes.disableRenderFixes, tr("Disable Render Fixes"), tr("Unchecked"), tr("This option disables game-specific render fixes."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.disablePartialInvalidation, tr("Disable Partial Source Invalidation"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.disablePartialInvalidation, tr("Disable Partial Source Invalidation"), tr("Unchecked"),
|
||||
tr("By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise. "
|
||||
"This hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load. "
|
||||
"It helps with the Snowblind engine games."));
|
||||
dialog->registerWidgetHelp(m_fixes.frameBufferConversion, tr("Framebuffer Conversion"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.frameBufferConversion, tr("Framebuffer Conversion"), tr("Unchecked"),
|
||||
tr("Convert 4-bit and 8-bit framebuffer on the CPU instead of the GPU. "
|
||||
"Helps Harry Potter and Stuntman games. It has a big impact on performance."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.preloadFrameData, tr("Preload Frame Data"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.preloadFrameData, tr("Preload Frame Data"), tr("Unchecked"),
|
||||
tr("Uploads GS data when rendering a new frame to reproduce some effects accurately."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.textureInsideRt, tr("Texture Inside RT"), tr("Disabled"),
|
||||
dialog()->registerWidgetHelp(m_fixes.textureInsideRt, tr("Texture Inside RT"), tr("Disabled"),
|
||||
tr("Allows the texture cache to reuse as an input texture the inner portion of a previous framebuffer."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.readTCOnClose, tr("Read Targets When Closing"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.readTCOnClose, tr("Read Targets When Closing"), tr("Unchecked"),
|
||||
tr("Flushes all targets in the texture cache back to local memory when shutting down. Can prevent lost visuals when saving "
|
||||
"state or switching renderers, but can also cause graphical corruption."));
|
||||
|
||||
dialog->registerWidgetHelp(m_fixes.estimateTextureRegion, tr("Estimate Texture Region"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_fixes.estimateTextureRegion, tr("Estimate Texture Region"), tr("Unchecked"),
|
||||
tr("Attempts to reduce the texture size when games do not set it themselves (e.g. Snowblind games)."));
|
||||
}
|
||||
|
||||
// Upscaling Fixes tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_upscaling.halfPixelOffset, tr("Half Pixel Offset"), tr("Off (Default)"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.halfPixelOffset, tr("Half Pixel Offset"), tr("Off (Default)"),
|
||||
tr("Might fix some misaligned fog, bloom, or blend effect."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.roundSprite, tr("Round Sprite"), tr("Off (Default)"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.roundSprite, tr("Round Sprite"), tr("Off (Default)"),
|
||||
tr("Corrects the sampling of 2D sprite textures when upscaling. "
|
||||
"Fixes lines in sprites of games like Ar tonelico when upscaling. Half option is for flat sprites, Full is for all "
|
||||
"sprites."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.textureOffsetX, tr("Texture Offsets X"), tr("0"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.textureOffsetX, tr("Texture Offsets X"), tr("0"),
|
||||
//: ST and UV are different types of texture coordinates, like XY would be spatial coordinates.
|
||||
tr("Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment "
|
||||
"too."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.textureOffsetY, tr("Texture Offsets Y"), tr("0"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.textureOffsetY, tr("Texture Offsets Y"), tr("0"),
|
||||
//: ST and UV are different types of texture coordinates, like XY would be spatial coordinates.
|
||||
tr("Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment "
|
||||
"too."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.alignSprite, tr("Align Sprite"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.alignSprite, tr("Align Sprite"), tr("Unchecked"),
|
||||
//: Namco: a game publisher and development company. Leave the name as-is. Ace Combat, Tekken, Soul Calibur: game names. Leave as-is or use official translations.
|
||||
tr("Fixes issues with upscaling (vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.forceEvenSpritePosition, tr("Force Even Sprite Position"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.forceEvenSpritePosition, tr("Force Even Sprite Position"), tr("Unchecked"),
|
||||
//: Wild Arms: name of a game series. Leave as-is or use an official translation.
|
||||
tr("Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.bilinearHack, tr("Bilinear Upscale"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.bilinearHack, tr("Bilinear Upscale"), tr("Unchecked"),
|
||||
tr("Can smooth out textures due to be bilinear filtered when upscaling. E.g. Brave sun glare."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.mergeSprite, tr("Merge Sprite"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.mergeSprite, tr("Merge Sprite"), tr("Unchecked"),
|
||||
tr("Replaces post-processing multiple paving sprites by a single fat sprite. It reduces various upscaling lines."));
|
||||
|
||||
dialog->registerWidgetHelp(m_upscaling.nativePaletteDraw, tr("Unscaled Palette Texture Draws"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_upscaling.nativePaletteDraw, tr("Unscaled Palette Texture Draws"), tr("Unchecked"),
|
||||
tr("Forces palette texture draws to render at native resolution."));
|
||||
}
|
||||
|
||||
// Texture Replacement tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_texture.dumpReplaceableTextures, tr("Dump Textures"), tr("Unchecked"), tr("Dumps replaceable textures to disk. Will reduce performance."));
|
||||
dialog()->registerWidgetHelp(m_texture.dumpReplaceableTextures, tr("Dump Textures"), tr("Unchecked"), tr("Dumps replaceable textures to disk. Will reduce performance."));
|
||||
|
||||
dialog->registerWidgetHelp(m_texture.dumpReplaceableMipmaps, tr("Dump Mipmaps"), tr("Unchecked"), tr("Includes mipmaps when dumping textures."));
|
||||
dialog()->registerWidgetHelp(m_texture.dumpReplaceableMipmaps, tr("Dump Mipmaps"), tr("Unchecked"), tr("Includes mipmaps when dumping textures."));
|
||||
|
||||
dialog->registerWidgetHelp(m_texture.dumpTexturesWithFMVActive, tr("Dump FMV Textures"), tr("Unchecked"), tr("Allows texture dumping when FMVs are active. You should not enable this."));
|
||||
dialog()->registerWidgetHelp(m_texture.dumpTexturesWithFMVActive, tr("Dump FMV Textures"), tr("Unchecked"), tr("Allows texture dumping when FMVs are active. You should not enable this."));
|
||||
|
||||
dialog->registerWidgetHelp(m_texture.loadTextureReplacementsAsync, tr("Asynchronous Texture Loading"), tr("Checked"), tr("Loads replacement textures on a worker thread, reducing microstutter when replacements are enabled."));
|
||||
dialog()->registerWidgetHelp(m_texture.loadTextureReplacementsAsync, tr("Asynchronous Texture Loading"), tr("Checked"), tr("Loads replacement textures on a worker thread, reducing microstutter when replacements are enabled."));
|
||||
|
||||
dialog->registerWidgetHelp(m_texture.loadTextureReplacements, tr("Load Textures"), tr("Unchecked"), tr("Loads replacement textures where available and user-provided."));
|
||||
dialog()->registerWidgetHelp(m_texture.loadTextureReplacements, tr("Load Textures"), tr("Unchecked"), tr("Loads replacement textures where available and user-provided."));
|
||||
|
||||
dialog->registerWidgetHelp(m_texture.precacheTextureReplacements, tr("Precache Textures"), tr("Unchecked"), tr("Preloads all replacement textures to memory. Not necessary with asynchronous loading."));
|
||||
dialog()->registerWidgetHelp(m_texture.precacheTextureReplacements, tr("Precache Textures"), tr("Unchecked"), tr("Preloads all replacement textures to memory. Not necessary with asynchronous loading."));
|
||||
}
|
||||
|
||||
// Post Processing tab
|
||||
{
|
||||
//: You might find an official translation for this on AMD's website (Spanish version linked): https://www.amd.com/es/technologies/radeon-software-fidelityfx
|
||||
dialog->registerWidgetHelp(m_post.casMode, tr("Contrast Adaptive Sharpening"), tr("None (Default)"), tr("Enables FidelityFX Contrast Adaptive Sharpening."));
|
||||
dialog()->registerWidgetHelp(m_post.casMode, tr("Contrast Adaptive Sharpening"), tr("None (Default)"), tr("Enables FidelityFX Contrast Adaptive Sharpening."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.casSharpness, tr("Sharpness"), tr("50%"), tr("Determines the intensity the sharpening effect in CAS post-processing."));
|
||||
dialog()->registerWidgetHelp(m_post.casSharpness, tr("Sharpness"), tr("50%"), tr("Determines the intensity the sharpening effect in CAS post-processing."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.shadeBoost, tr("Shade Boost"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_post.shadeBoost, tr("Shade Boost"), tr("Unchecked"),
|
||||
tr("Enables saturation, contrast, and brightness to be adjusted. Values of brightness, saturation, and contrast are at default "
|
||||
"50."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_post.fxaa, tr("FXAA"), tr("Unchecked"), tr("Applies the FXAA anti-aliasing algorithm to improve the visual quality of games."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.shadeBoostBrightness, tr("Brightness"), tr("50"), tr("Adjusts brightness. 50 is normal."));
|
||||
dialog()->registerWidgetHelp(m_post.shadeBoostBrightness, tr("Brightness"), tr("50"), tr("Adjusts brightness. 50 is normal."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.shadeBoostContrast, tr("Contrast"), tr("50"), tr("Adjusts contrast. 50 is normal."));
|
||||
dialog()->registerWidgetHelp(m_post.shadeBoostContrast, tr("Contrast"), tr("50"), tr("Adjusts contrast. 50 is normal."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.shadeBoostGamma, tr("Gamma"), tr("50"), tr("Adjusts gamma. 50 is normal."));
|
||||
dialog()->registerWidgetHelp(m_post.shadeBoostGamma, tr("Gamma"), tr("50"), tr("Adjusts gamma. 50 is normal."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.shadeBoostSaturation, tr("Saturation"), tr("50"), tr("Adjusts saturation. 50 is normal."));
|
||||
dialog()->registerWidgetHelp(m_post.shadeBoostSaturation, tr("Saturation"), tr("50"), tr("Adjusts saturation. 50 is normal."));
|
||||
|
||||
dialog->registerWidgetHelp(m_post.tvShader, tr("TV Shader"), tr("None (Default)"),
|
||||
dialog()->registerWidgetHelp(m_post.tvShader, tr("TV Shader"), tr("None (Default)"),
|
||||
tr("Applies a shader which replicates the visual effects of different styles of television sets."));
|
||||
}
|
||||
|
||||
// OSD tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_osd.scale, tr("OSD Scale"), tr("100%"), tr("Scales the size of the onscreen OSD from 50% to 500%."));
|
||||
dialog()->registerWidgetHelp(m_osd.scale, tr("OSD Scale"), tr("100%"), tr("Scales the size of the onscreen OSD from 50% to 500%."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.messagesPos, tr("OSD Messages Position"), tr("Left (Default)"),
|
||||
dialog()->registerWidgetHelp(m_osd.messagesPos, tr("OSD Messages Position"), tr("Left (Default)"),
|
||||
tr("Shows on-screen-display messages when events occur such as save states being "
|
||||
"created/loaded, screenshots being taken, etc."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.performancePos, tr("OSD Statistics Position"), tr("Right (Default)"),
|
||||
dialog()->registerWidgetHelp(m_osd.performancePos, tr("OSD Statistics Position"), tr("Right (Default)"),
|
||||
tr("Shows a variety of on-screen performance data points as selected by the user."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showFPS, tr("Show FPS"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showFPS, tr("Show FPS"), tr("Unchecked"),
|
||||
tr("Shows the internal frame rate of the game in the top-right corner of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showVPS, tr("Show VPS"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showVPS, tr("Show VPS"), tr("Unchecked"),
|
||||
tr("Shows the vsync rate of the emulator in the top-right corner of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showSpeed, tr("Show Speed Percentages"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showSpeed, tr("Show Speed Percentages"), tr("Unchecked"),
|
||||
tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showResolution, tr("Show Resolution"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showResolution, tr("Show Resolution"), tr("Unchecked"),
|
||||
tr("Shows the resolution of the game in the top-right corner of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showCPU, tr("Show CPU Usage"), tr("Unchecked"), tr("Shows host's CPU utilization."));
|
||||
dialog()->registerWidgetHelp(m_osd.showCPU, tr("Show CPU Usage"), tr("Unchecked"), tr("Shows host's CPU utilization."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showGPU, tr("Show GPU Usage"), tr("Unchecked"), tr("Shows host's GPU utilization."));
|
||||
dialog()->registerWidgetHelp(m_osd.showGPU, tr("Show GPU Usage"), tr("Unchecked"), tr("Shows host's GPU utilization."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showGSStats, tr("Show Statistics"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showGSStats, tr("Show Statistics"), tr("Unchecked"),
|
||||
tr("Shows counters for internal graphical utilization, useful for debugging."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showIndicators, tr("Show Indicators"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showIndicators, tr("Show Indicators"), tr("Checked"),
|
||||
tr("Shows OSD icon indicators for emulation states such as Pausing, Turbo, Fast-Forward, and Slow-Motion."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showSettings, tr("Show Settings"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showSettings, tr("Show Settings"), tr("Unchecked"),
|
||||
tr("Displays various settings and the current values of those settings, useful for debugging."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showInputs, tr("Show Inputs"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showInputs, tr("Show Inputs"), tr("Unchecked"),
|
||||
tr("Shows the current controller state of the system in the bottom-left corner of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showFrameTimes, tr("Show Frame Times"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showFrameTimes, tr("Show Frame Times"), tr("Unchecked"),
|
||||
tr("Displays a graph showing the average frametimes."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showVersion, tr("Show PCSX2 Version"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showVersion, tr("Show PCSX2 Version"), tr("Unchecked"),
|
||||
tr("Shows the current PCSX2 version on the top-right corner of the display."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showVideoCapture, tr("Show Video Capture Status"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showVideoCapture, tr("Show Video Capture Status"), tr("Checked"),
|
||||
tr("Shows the currently active video capture status."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showInputRec, tr("Show Input Recording Status"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showInputRec, tr("Show Input Recording Status"), tr("Checked"),
|
||||
tr("Shows the currently active input recording status."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.showHardwareInfo, tr("Show Hardware Info"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_osd.showHardwareInfo, tr("Show Hardware Info"), tr("Unchecked"),
|
||||
tr("Shows the current system hardware information on the OSD."));
|
||||
|
||||
dialog->registerWidgetHelp(m_osd.warnAboutUnsafeSettings, tr("Warn About Unsafe Settings"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_osd.warnAboutUnsafeSettings, tr("Warn About Unsafe Settings"), tr("Checked"),
|
||||
tr("Displays warnings when settings are enabled which may break games."));
|
||||
}
|
||||
|
||||
// Recording tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_capture.videoCaptureCodec, tr("Video Codec"), tr("Default"),
|
||||
dialog()->registerWidgetHelp(m_capture.videoCaptureCodec, tr("Video Codec"), tr("Default"),
|
||||
tr("Selects the Video Codec to be used for Video Capture. "
|
||||
"<b>If unsure, leave it on default.<b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.videoCaptureFormat, tr("Video Format"), tr("Default"),
|
||||
dialog()->registerWidgetHelp(m_capture.videoCaptureFormat, tr("Video Format"), tr("Default"),
|
||||
tr("Selects the Video Format to be used for Video Capture. If by chance the codec does not support the format, the first format available will be used. "
|
||||
"<b>If unsure, leave it on default.<b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.videoCaptureBitrate, tr("Video Bitrate"), tr("6000 kbps"),
|
||||
dialog()->registerWidgetHelp(m_capture.videoCaptureBitrate, tr("Video Bitrate"), tr("6000 kbps"),
|
||||
tr("Sets the video bitrate to be used. "
|
||||
"Higher bitrates generally yield better video quality at the cost of larger resulting file sizes."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.videoCaptureResolutionAuto, tr("Automatic Resolution"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_capture.videoCaptureResolutionAuto, tr("Automatic Resolution"), tr("Unchecked"),
|
||||
tr("When checked, the video capture resolution will follow the internal resolution of the running game.<br><br>"
|
||||
|
||||
"<b>Be careful when using this setting especially when you are upscaling, as higher internal resolutions (above 4x) can result in very large video capture and can cause system overload.</b>"));
|
||||
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.enableVideoCaptureArguments, tr("Enable Extra Video Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected video codec."));
|
||||
dialog()->registerWidgetHelp(m_capture.enableVideoCaptureArguments, tr("Enable Extra Video Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected video codec."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.videoCaptureArguments, tr("Extra Video Arguments"), tr("Leave It Blank"),
|
||||
dialog()->registerWidgetHelp(m_capture.videoCaptureArguments, tr("Extra Video Arguments"), tr("Leave It Blank"),
|
||||
tr("Parameters passed to the selected video codec.<br>"
|
||||
"<b>You must use '=' to separate key from value and ':' to separate two pairs from each other.</b><br>"
|
||||
"For example: \"crf = 21 : preset = veryfast\""));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.audioCaptureCodec, tr("Audio Codec"), tr("Default"),
|
||||
dialog()->registerWidgetHelp(m_capture.audioCaptureCodec, tr("Audio Codec"), tr("Default"),
|
||||
tr("Selects the Audio Codec to be used for Video Capture. "
|
||||
"<b>If unsure, leave it on default.<b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.audioCaptureBitrate, tr("Audio Bitrate"), tr("192 kbps"), tr("Sets the audio bitrate to be used."));
|
||||
dialog()->registerWidgetHelp(m_capture.audioCaptureBitrate, tr("Audio Bitrate"), tr("192 kbps"), tr("Sets the audio bitrate to be used."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.enableAudioCaptureArguments, tr("Enable Extra Audio Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected audio codec."));
|
||||
dialog()->registerWidgetHelp(m_capture.enableAudioCaptureArguments, tr("Enable Extra Audio Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected audio codec."));
|
||||
|
||||
dialog->registerWidgetHelp(m_capture.audioCaptureArguments, tr("Extra Audio Arguments"), tr("Leave It Blank"),
|
||||
dialog()->registerWidgetHelp(m_capture.audioCaptureArguments, tr("Extra Audio Arguments"), tr("Leave It Blank"),
|
||||
tr("Parameters passed to the selected audio codec.<br>"
|
||||
"<b>You must use '=' to separate key from value and ':' to separate two pairs from each other.</b><br>"
|
||||
"For example: \"compression_level = 4 : joint_stereo = 1\""));
|
||||
|
|
@ -821,39 +821,39 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||
|
||||
// Advanced tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_advanced.gsDumpCompression, tr("GS Dump Compression"), tr("Zstandard (zst)"),
|
||||
dialog()->registerWidgetHelp(m_advanced.gsDumpCompression, tr("GS Dump Compression"), tr("Zstandard (zst)"),
|
||||
tr("Change the compression algorithm used when creating a GS dump."));
|
||||
|
||||
//: Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit \nSwap chain: see Microsoft's Terminology Portal.
|
||||
dialog->registerWidgetHelp(m_advanced.useBlitSwapChain, tr("Use Blit Swap Chain"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.useBlitSwapChain, tr("Use Blit Swap Chain"), tr("Unchecked"),
|
||||
//: Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit
|
||||
tr("Uses a blit presentation model instead of flipping when using the Direct3D 11 "
|
||||
"renderer. This usually results in slower performance, but may be required for some "
|
||||
"streaming applications, or to uncap framerates on some systems."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.exclusiveFullscreenControl, tr("Allow Exclusive Fullscreen"), tr("Automatic (Default)"),
|
||||
dialog()->registerWidgetHelp(m_advanced.exclusiveFullscreenControl, tr("Allow Exclusive Fullscreen"), tr("Automatic (Default)"),
|
||||
tr("Overrides the driver's heuristics for enabling exclusive fullscreen, or direct flip/scanout.<br>"
|
||||
"Disallowing exclusive fullscreen may enable smoother task switching and overlays, but increase input latency."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.disableMailboxPresentation, tr("Disable Mailbox Presentation"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.disableMailboxPresentation, tr("Disable Mailbox Presentation"), tr("Unchecked"),
|
||||
tr("Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. "
|
||||
"Usually results in worse frame pacing."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.extendedUpscales, tr("Extended Upscaling Multipliers"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.extendedUpscales, tr("Extended Upscaling Multipliers"), tr("Unchecked"),
|
||||
tr("Displays additional, very high upscaling multipliers dependent on GPU capability."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.useDebugDevice, tr("Enable Debug Device"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_advanced.useDebugDevice, tr("Enable Debug Device"), tr("Unchecked"),
|
||||
tr("Enables API-level validation of graphics commands."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.gsDownloadMode, tr("GS Download Mode"), tr("Accurate"),
|
||||
dialog()->registerWidgetHelp(m_advanced.gsDownloadMode, tr("GS Download Mode"), tr("Accurate"),
|
||||
tr("Skips synchronizing with the GS thread and host GPU for GS downloads. "
|
||||
"Can result in a large speed boost on slower systems, at the cost of many broken graphical effects. "
|
||||
"If games are broken and you have this option enabled, please disable it first."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.ntscFrameRate, tr("NTSC Frame Rate"), tr("59.94 Hz"),
|
||||
dialog()->registerWidgetHelp(m_advanced.ntscFrameRate, tr("NTSC Frame Rate"), tr("59.94 Hz"),
|
||||
tr("Determines what frame rate NTSC games run at."));
|
||||
|
||||
dialog->registerWidgetHelp(m_advanced.palFrameRate, tr("PAL Frame Rate"), tr("50.00 Hz"),
|
||||
dialog()->registerWidgetHelp(m_advanced.palFrameRate, tr("PAL Frame Rate"), tr("50.00 Hz"),
|
||||
tr("Determines what frame rate PAL games run at."));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,12 @@
|
|||
|
||||
enum class GSRendererType : s8;
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class GraphicsSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
GraphicsSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~GraphicsSettingsWidget();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
|||
|
|
@ -71,12 +71,12 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = {
|
|||
"Custom",
|
||||
nullptr};
|
||||
|
||||
InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.inhibitScreensaver, "EmuCore", "InhibitScreensaver", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.confirmShutdown, "UI", "ConfirmShutdown", true);
|
||||
|
|
@ -110,15 +110,15 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
connect(m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit languageChanged(); });
|
||||
|
||||
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnStart, "UI", "StartPaused", false);
|
||||
}
|
||||
|
||||
if (!dialog->isPerGameSettings() && AutoUpdaterDialog::isSupported())
|
||||
if (!dialog()->isPerGameSettings() && AutoUpdaterDialog::isSupported())
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
|
||||
dialog->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
|
||||
tr("Automatically checks for updates to the program on startup. Updates can be deferred "
|
||||
"until later or skipped entirely."));
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
m_ui.automaticUpdaterGroup->hide();
|
||||
}
|
||||
|
||||
if (dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
// language/theme doesn't make sense to have in per-game settings
|
||||
m_ui.verticalLayout->removeWidget(m_ui.preferencesGroup);
|
||||
|
|
@ -146,43 +146,43 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
|||
m_ui.pauseOnStart->setEnabled(false);
|
||||
}
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.inhibitScreensaver, tr("Inhibit Screensaver"), tr("Checked"),
|
||||
tr("Prevents the screen saver from activating and the host from sleeping while emulation is running."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.confirmShutdown, tr("Confirm Shutdown"), tr("Checked"),
|
||||
tr("Determines whether a prompt will be displayed to confirm shutting down the virtual machine "
|
||||
"when the hotkey is pressed."));
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnStart, tr("Pause On Start"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.pauseOnStart, tr("Pause On Start"), tr("Unchecked"),
|
||||
tr("Pauses the emulator when a game is started."));
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnFocusLoss, tr("Pause On Focus Loss"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.pauseOnFocusLoss, tr("Pause On Focus Loss"), tr("Unchecked"),
|
||||
tr("Pauses the emulator when you minimize the window or switch to another application, "
|
||||
"and unpauses when you switch back."));
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"),
|
||||
dialog()->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"),
|
||||
tr("Unchecked"), tr("Pauses the emulator when a controller with bindings is disconnected."));
|
||||
dialog->registerWidgetHelp(m_ui.startFullscreen, tr("Start Fullscreen"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.startFullscreen, tr("Start Fullscreen"), tr("Unchecked"),
|
||||
tr("Automatically switches to fullscreen mode when a game is started."));
|
||||
dialog->registerWidgetHelp(m_ui.hideMouseCursor, tr("Hide Cursor In Fullscreen"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.hideMouseCursor, tr("Hide Cursor In Fullscreen"), tr("Unchecked"),
|
||||
tr("Hides the mouse pointer/cursor when the emulator is in fullscreen mode."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.renderToSeparateWindow, tr("Render To Separate Window"), tr("Unchecked"),
|
||||
tr("Renders the game to a separate window, instead of the main window. If unchecked, the game will display over the game list."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.hideMainWindow, tr("Hide Main Window When Running"), tr("Unchecked"),
|
||||
tr("Hides the main window (with the game list) when a game is running. Requires Render To Separate Window to be enabled."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.discordPresence, tr("Enable Discord Presence"), tr("Unchecked"),
|
||||
tr("Shows the game you are currently playing as part of your profile in Discord."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.mouseLock, tr("Enable Mouse Lock"), tr("Unchecked"),
|
||||
tr("Locks the mouse cursor to the windows when PCSX2 is in focus and all other windows are closed.<br><b>Unavailable on Linux Wayland.</b><br><b>Requires accessibility permissions on macOS.</b>"));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.doubleClickTogglesFullscreen, tr("Double-Click Toggles Fullscreen"), tr("Checked"),
|
||||
tr("Allows switching in and out of fullscreen mode by double-clicking the game window."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.disableWindowResizing, tr("Disable Window Resizing"), tr("Unchecked"),
|
||||
tr("Prevents the main window from being resized."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.startFullscreenUI, tr("Start Big Picture Mode"), tr("Unchecked"),
|
||||
tr("Automatically starts Big Picture Mode instead of the regular Qt interface when PCSX2 launches."));
|
||||
|
||||
|
|
|
|||
|
|
@ -3,18 +3,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_InterfaceSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class InterfaceSettingsWidget : public QWidget
|
||||
class InterfaceSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
InterfaceSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~InterfaceSettingsWidget();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ static std::string getSlotFilenameKey(u32 slot)
|
|||
return StringUtil::StdStringFromFormat("Slot%u_Filename", slot + 1);
|
||||
}
|
||||
|
||||
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
// this is a bit lame, but resizeEvent() isn't good enough to autosize our columns,
|
||||
// since the group box hasn't been resized at that point.
|
||||
|
|
@ -60,7 +59,7 @@ MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidg
|
|||
|
||||
refresh();
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.automaticManagement, tr("Automatically manage saves based on running game"),
|
||||
dialog()->registerWidgetHelp(m_ui.automaticManagement, tr("Automatically manage saves based on running game"),
|
||||
tr("Checked"),
|
||||
tr("(Folder type only / Card size: Auto) Loads only the relevant booted game saves, ignoring others. Avoids "
|
||||
"running out of space for saves."));
|
||||
|
|
@ -98,11 +97,11 @@ void MemoryCardSettingsWidget::setupAdditionalUi()
|
|||
|
||||
void MemoryCardSettingsWidget::createSlotWidgets(SlotGroup* port, u32 slot)
|
||||
{
|
||||
const bool perGame = m_dialog->isPerGameSettings();
|
||||
const bool perGame = dialog()->isPerGameSettings();
|
||||
|
||||
port->root = new QWidget(m_ui.slotGroupBox);
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
port->enable = new QCheckBox(tr("Slot %1").arg(slot + 1), port->root);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, port->enable, CONFIG_SECTION, StringUtil::StdStringFromFormat("Slot%u_Enable", slot + 1), true);
|
||||
|
|
@ -154,14 +153,14 @@ void MemoryCardSettingsWidget::tryInsertCard(u32 slot, const QString& newCard)
|
|||
return;
|
||||
}
|
||||
|
||||
m_dialog->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(), newCardStr.c_str());
|
||||
dialog()->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(), newCardStr.c_str());
|
||||
refresh();
|
||||
}
|
||||
|
||||
void MemoryCardSettingsWidget::ejectSlot(u32 slot)
|
||||
{
|
||||
m_dialog->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(),
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<const char*>(""));
|
||||
dialog()->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(),
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<const char*>(""));
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
@ -310,22 +309,22 @@ void MemoryCardSettingsWidget::listContextMenuRequested(const QPoint& pos)
|
|||
|
||||
void MemoryCardSettingsWidget::refresh()
|
||||
{
|
||||
const bool perGame = m_dialog->isPerGameSettings();
|
||||
const bool perGame = dialog()->isPerGameSettings();
|
||||
|
||||
for (u32 slot = 0; slot < static_cast<u32>(m_slots.size()); slot++)
|
||||
{
|
||||
const bool enabled = m_slots[slot].enable->isChecked();
|
||||
const std::string slotKey = getSlotFilenameKey(slot);
|
||||
const std::optional<std::string> name(
|
||||
m_dialog->getEffectiveStringValue(CONFIG_SECTION, slotKey.c_str(), FileMcd_GetDefaultName(slot).c_str()));
|
||||
const bool inherited = perGame ? !m_dialog->containsSettingValue(CONFIG_SECTION, slotKey.c_str()) : false;
|
||||
dialog()->getEffectiveStringValue(CONFIG_SECTION, slotKey.c_str(), FileMcd_GetDefaultName(slot).c_str()));
|
||||
const bool inherited = perGame ? !dialog()->containsSettingValue(CONFIG_SECTION, slotKey.c_str()) : false;
|
||||
|
||||
m_slots[slot].slot->setCard(name, inherited);
|
||||
m_slots[slot].slot->setEnabled(enabled);
|
||||
m_slots[slot].eject->setEnabled(enabled);
|
||||
}
|
||||
|
||||
m_ui.cardList->refresh(m_dialog);
|
||||
m_ui.cardList->refresh(dialog());
|
||||
updateCardActions();
|
||||
}
|
||||
|
||||
|
|
@ -333,8 +332,8 @@ void MemoryCardSettingsWidget::swapCards()
|
|||
{
|
||||
const std::string card1Key = getSlotFilenameKey(0);
|
||||
const std::string card2Key = getSlotFilenameKey(1);
|
||||
std::optional<std::string> card1Name = m_dialog->getStringValue(CONFIG_SECTION, card1Key.c_str(), std::nullopt);
|
||||
std::optional<std::string> card2Name = m_dialog->getStringValue(CONFIG_SECTION, card2Key.c_str(), std::nullopt);
|
||||
std::optional<std::string> card1Name = dialog()->getStringValue(CONFIG_SECTION, card1Key.c_str(), std::nullopt);
|
||||
std::optional<std::string> card2Name = dialog()->getStringValue(CONFIG_SECTION, card2Key.c_str(), std::nullopt);
|
||||
if (!card1Name.has_value() || card1Name->empty() || !card2Name.has_value() || card2Name->empty())
|
||||
{
|
||||
QMessageBox::critical(
|
||||
|
|
@ -342,8 +341,8 @@ void MemoryCardSettingsWidget::swapCards()
|
|||
return;
|
||||
}
|
||||
|
||||
m_dialog->setStringSettingValue(CONFIG_SECTION, card1Key.c_str(), card2Name->c_str());
|
||||
m_dialog->setStringSettingValue(CONFIG_SECTION, card2Key.c_str(), card1Name->c_str());
|
||||
dialog()->setStringSettingValue(CONFIG_SECTION, card1Key.c_str(), card2Name->c_str());
|
||||
dialog()->setStringSettingValue(CONFIG_SECTION, card2Key.c_str(), card1Name->c_str());
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
#include <QtGui/QResizeEvent>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtWidgets/QTreeWidget>
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtWidgets/QListWidget>
|
||||
|
||||
class SettingsWindow;
|
||||
#include <array>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
struct AvailableMcdInfo;
|
||||
|
||||
|
|
@ -56,7 +55,7 @@ protected:
|
|||
// Must be included *after* the custom widgets.
|
||||
#include "ui_MemoryCardSettingsWidget.h"
|
||||
|
||||
class MemoryCardSettingsWidget : public QWidget
|
||||
class MemoryCardSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
@ -66,7 +65,7 @@ public:
|
|||
MAX_SLOTS = 2
|
||||
};
|
||||
|
||||
MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
MemoryCardSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~MemoryCardSettingsWidget();
|
||||
|
||||
protected:
|
||||
|
|
@ -103,7 +102,6 @@ private:
|
|||
void renameCard();
|
||||
void convertCard();
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
Ui::MemoryCardSettingsWidget m_ui;
|
||||
|
||||
std::array<SlotGroup, MAX_SLOTS> m_slots;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QScrollArea>
|
||||
|
||||
SettingsWidget::SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
SettingsWidget::SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
, m_dialog(settings_dialog)
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -14,26 +14,26 @@ class SettingsWidget : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
SettingsWidget(SettingsWindow* dialog, QWidget* parent = nullptr);
|
||||
SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent = nullptr);
|
||||
|
||||
__fi SettingsWindow* dialog() { return m_dialog; }
|
||||
__fi const SettingsWindow* dialog() const { return m_dialog; }
|
||||
|
||||
template <typename HeaderUi>
|
||||
void setupHeader(HeaderUi* header_ui)
|
||||
void setupHeader(HeaderUi& header_ui)
|
||||
{
|
||||
QWidget* header = new QWidget(this);
|
||||
header_ui->setupUi(header);
|
||||
header_ui.setupUi(header);
|
||||
|
||||
addPageHeader(header);
|
||||
}
|
||||
|
||||
// Create a settings tab with a scroll area.
|
||||
template <typename ContentsUi>
|
||||
QWidget* setupTab(QString name, ContentsUi* contents_ui)
|
||||
QWidget* setupTab(ContentsUi& contents_ui, QString name = QString())
|
||||
{
|
||||
QWidget* contents = new QWidget(this);
|
||||
contents_ui->setupUi(contents);
|
||||
contents_ui.setupUi(contents);
|
||||
|
||||
return addTab(name, contents);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue