mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 00:35:46 -04:00
GameSettings: Add a bunch more user settings
This commit is contained in:
@ -9,9 +9,13 @@
|
||||
#include "scmversion/scmversion.h"
|
||||
#include <QtGui/QClipboard>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
static constexpr char MEMORY_CARD_IMAGE_FILTER[] =
|
||||
QT_TRANSLATE_NOOP("MemoryCardSettingsWidget", "All Memory Card Types (*.mcd *.mcr *.mc)");
|
||||
|
||||
GamePropertiesDialog::GamePropertiesDialog(QtHostInterface* host_interface, QWidget* parent /* = nullptr */)
|
||||
: QDialog(parent), m_host_interface(host_interface)
|
||||
{
|
||||
@ -127,13 +131,15 @@ void GamePropertiesDialog::setupAdditionalUi()
|
||||
qApp->translate("DisplayCropMode", Settings::GetDisplayCropModeDisplayName(static_cast<DisplayCropMode>(i))));
|
||||
}
|
||||
|
||||
m_ui.userResolutionScale->addItem(tr("(unchanged)"));
|
||||
QtUtils::FillComboBoxWithResolutionScales(m_ui.userResolutionScale);
|
||||
|
||||
m_ui.userControllerType1->addItem(tr("(unchanged)"));
|
||||
for (u32 i = 0; i < static_cast<u32>(ControllerType::Count); i++)
|
||||
{
|
||||
m_ui.userControllerType1->addItem(
|
||||
qApp->translate("ControllerType", Settings::GetControllerTypeDisplayName(static_cast<ControllerType>(i))));
|
||||
}
|
||||
|
||||
m_ui.userControllerType2->addItem(tr("(unchanged)"));
|
||||
for (u32 i = 0; i < static_cast<u32>(ControllerType::Count); i++)
|
||||
{
|
||||
@ -141,6 +147,19 @@ void GamePropertiesDialog::setupAdditionalUi()
|
||||
qApp->translate("ControllerType", Settings::GetControllerTypeDisplayName(static_cast<ControllerType>(i))));
|
||||
}
|
||||
|
||||
m_ui.userMemoryCard1Type->addItem(tr("(unchanged)"));
|
||||
for (u32 i = 0; i < static_cast<u32>(MemoryCardType::Count); i++)
|
||||
{
|
||||
m_ui.userMemoryCard1Type->addItem(
|
||||
qApp->translate("MemoryCardType", Settings::GetMemoryCardTypeDisplayName(static_cast<MemoryCardType>(i))));
|
||||
}
|
||||
m_ui.userMemoryCard2Type->addItem(tr("(unchanged)"));
|
||||
for (u32 i = 0; i < static_cast<u32>(MemoryCardType::Count); i++)
|
||||
{
|
||||
m_ui.userMemoryCard2Type->addItem(
|
||||
qApp->translate("MemoryCardType", Settings::GetMemoryCardTypeDisplayName(static_cast<MemoryCardType>(i))));
|
||||
}
|
||||
|
||||
QGridLayout* traits_layout = new QGridLayout(m_ui.compatibilityTraits);
|
||||
for (u32 i = 0; i < static_cast<u32>(GameSettings::Trait::Count); i++)
|
||||
{
|
||||
@ -198,6 +217,26 @@ void GamePropertiesDialog::populateTracksInfo(const std::string& image_path)
|
||||
}
|
||||
}
|
||||
|
||||
void GamePropertiesDialog::populateBooleanUserSetting(QCheckBox* cb, const std::optional<bool>& value)
|
||||
{
|
||||
QSignalBlocker sb(cb);
|
||||
if (value.has_value())
|
||||
cb->setCheckState(value.value() ? Qt::Checked : Qt::Unchecked);
|
||||
else
|
||||
cb->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
|
||||
void GamePropertiesDialog::connectBooleanUserSetting(QCheckBox* cb, std::optional<bool>* value)
|
||||
{
|
||||
connect(cb, &QCheckBox::stateChanged, [this, value](int state) {
|
||||
if (state == Qt::PartiallyChecked)
|
||||
value->reset();
|
||||
else
|
||||
*value = (state == Qt::Checked);
|
||||
saveGameSettings();
|
||||
});
|
||||
}
|
||||
|
||||
void GamePropertiesDialog::populateGameSettings()
|
||||
{
|
||||
const GameSettings::Entry& gs = m_game_settings;
|
||||
@ -230,6 +269,27 @@ void GamePropertiesDialog::populateGameSettings()
|
||||
m_ui.userAspectRatio->setCurrentIndex(static_cast<int>(gs.display_aspect_ratio.value()) + 1);
|
||||
}
|
||||
|
||||
populateBooleanUserSetting(m_ui.userLinearUpscaling, gs.display_linear_upscaling);
|
||||
populateBooleanUserSetting(m_ui.userIntegerUpscaling, gs.display_integer_upscaling);
|
||||
|
||||
if (gs.gpu_resolution_scale.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userResolutionScale);
|
||||
m_ui.userResolutionScale->setCurrentIndex(static_cast<int>(gs.gpu_resolution_scale.value()) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userResolutionScale);
|
||||
m_ui.userResolutionScale->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
populateBooleanUserSetting(m_ui.userTrueColor, gs.gpu_true_color);
|
||||
populateBooleanUserSetting(m_ui.userScaledDithering, gs.gpu_scaled_dithering);
|
||||
populateBooleanUserSetting(m_ui.userBilinearTextureFiltering, gs.gpu_bilinear_texture_filtering);
|
||||
populateBooleanUserSetting(m_ui.userForceNTSCTimings, gs.gpu_force_ntsc_timings);
|
||||
populateBooleanUserSetting(m_ui.userWidescreenHack, gs.gpu_widescreen_hack);
|
||||
populateBooleanUserSetting(m_ui.userPGXP, gs.gpu_pgxp);
|
||||
|
||||
if (gs.controller_1_type.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userControllerType1);
|
||||
@ -240,15 +300,26 @@ void GamePropertiesDialog::populateGameSettings()
|
||||
QSignalBlocker sb(m_ui.userControllerType2);
|
||||
m_ui.userControllerType2->setCurrentIndex(static_cast<int>(gs.controller_2_type.value()) + 1);
|
||||
}
|
||||
if (gs.gpu_widescreen_hack.has_value())
|
||||
|
||||
if (gs.memory_card_1_type.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userWidescreenHack);
|
||||
m_ui.userWidescreenHack->setCheckState(gs.gpu_widescreen_hack.value() ? Qt::Checked : Qt::Unchecked);
|
||||
QSignalBlocker sb(m_ui.userMemoryCard1Type);
|
||||
m_ui.userMemoryCard1Type->setCurrentIndex(static_cast<int>(gs.memory_card_1_type.value()) + 1);
|
||||
}
|
||||
else
|
||||
if (gs.memory_card_2_type.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userWidescreenHack);
|
||||
m_ui.userWidescreenHack->setCheckState(Qt::PartiallyChecked);
|
||||
QSignalBlocker sb(m_ui.userMemoryCard2Type);
|
||||
m_ui.userMemoryCard2Type->setCurrentIndex(static_cast<int>(gs.memory_card_2_type.value()) + 1);
|
||||
}
|
||||
if (!gs.memory_card_1_shared_path.empty())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userMemoryCard1SharedPath);
|
||||
m_ui.userMemoryCard1SharedPath->setText(QString::fromStdString(gs.memory_card_1_shared_path));
|
||||
}
|
||||
if (!gs.memory_card_2_shared_path.empty())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.userMemoryCard2SharedPath);
|
||||
m_ui.userMemoryCard2SharedPath->setText(QString::fromStdString(gs.memory_card_2_shared_path));
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,6 +377,24 @@ void GamePropertiesDialog::connectUi()
|
||||
saveGameSettings();
|
||||
});
|
||||
|
||||
connectBooleanUserSetting(m_ui.userLinearUpscaling, &m_game_settings.display_linear_upscaling);
|
||||
connectBooleanUserSetting(m_ui.userIntegerUpscaling, &m_game_settings.display_integer_upscaling);
|
||||
|
||||
connect(m_ui.userResolutionScale, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||
if (index <= 0)
|
||||
m_game_settings.gpu_resolution_scale.reset();
|
||||
else
|
||||
m_game_settings.gpu_resolution_scale = static_cast<u32>(index - 1);
|
||||
saveGameSettings();
|
||||
});
|
||||
|
||||
connectBooleanUserSetting(m_ui.userTrueColor, &m_game_settings.gpu_true_color);
|
||||
connectBooleanUserSetting(m_ui.userScaledDithering, &m_game_settings.gpu_scaled_dithering);
|
||||
connectBooleanUserSetting(m_ui.userForceNTSCTimings, &m_game_settings.gpu_force_ntsc_timings);
|
||||
connectBooleanUserSetting(m_ui.userBilinearTextureFiltering, &m_game_settings.gpu_bilinear_texture_filtering);
|
||||
connectBooleanUserSetting(m_ui.userWidescreenHack, &m_game_settings.gpu_widescreen_hack);
|
||||
connectBooleanUserSetting(m_ui.userPGXP, &m_game_settings.gpu_pgxp);
|
||||
|
||||
connect(m_ui.userControllerType1, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||
if (index <= 0)
|
||||
m_game_settings.controller_1_type.reset();
|
||||
@ -322,13 +411,50 @@ void GamePropertiesDialog::connectUi()
|
||||
saveGameSettings();
|
||||
});
|
||||
|
||||
connect(m_ui.userWidescreenHack, &QCheckBox::stateChanged, [this](int state) {
|
||||
if (state == Qt::PartiallyChecked)
|
||||
m_game_settings.gpu_widescreen_hack.reset();
|
||||
connect(m_ui.userMemoryCard1Type, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||
if (index <= 0)
|
||||
m_game_settings.memory_card_1_type.reset();
|
||||
else
|
||||
m_game_settings.gpu_widescreen_hack = (state == Qt::Checked);
|
||||
m_game_settings.memory_card_1_type = static_cast<MemoryCardType>(index - 1);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.userMemoryCard1SharedPath, &QLineEdit::textChanged, [this](const QString& text) {
|
||||
if (text.isEmpty())
|
||||
std::string().swap(m_game_settings.memory_card_1_shared_path);
|
||||
else
|
||||
m_game_settings.memory_card_1_shared_path = text.toStdString();
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.userMemoryCard1SharedPathBrowse, &QPushButton::clicked, [this]() {
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
|
||||
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
m_ui.userMemoryCard1SharedPath->setText(path);
|
||||
});
|
||||
connect(m_ui.userMemoryCard2Type, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||
if (index <= 0)
|
||||
m_game_settings.memory_card_2_type.reset();
|
||||
else
|
||||
m_game_settings.memory_card_2_type = static_cast<MemoryCardType>(index - 1);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.userMemoryCard2SharedPath, &QLineEdit::textChanged, [this](const QString& text) {
|
||||
if (text.isEmpty())
|
||||
std::string().swap(m_game_settings.memory_card_2_shared_path);
|
||||
else
|
||||
m_game_settings.memory_card_2_shared_path = text.toStdString();
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.userMemoryCard2SharedPathBrowse, &QPushButton::clicked, [this]() {
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
|
||||
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
m_ui.userMemoryCard2SharedPath->setText(path);
|
||||
});
|
||||
|
||||
for (u32 i = 0; i < static_cast<u32>(GameSettings::Trait::Count); i++)
|
||||
{
|
||||
|
@ -43,6 +43,8 @@ private:
|
||||
void populateCompatibilityInfo(const std::string& game_code);
|
||||
void populateTracksInfo(const std::string& image_path);
|
||||
void populateGameSettings();
|
||||
void populateBooleanUserSetting(QCheckBox* cb, const std::optional<bool>& value);
|
||||
void connectBooleanUserSetting(QCheckBox* cb, std::optional<bool>* value);
|
||||
void saveGameSettings();
|
||||
void fillEntryFromUi(GameListCompatibilityEntry* entry);
|
||||
void computeTrackHashes();
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>793</width>
|
||||
<height>647</height>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -21,7 +21,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -190,39 +190,132 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>GPU Settings</string>
|
||||
<string>GPU Screen Display</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Crop Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="userCropMode"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Aspect Ratio:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="userAspectRatio"/>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="userWidescreenHack">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Widescreen Hack</string>
|
||||
<string>Crop Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="userCropMode"/>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="userLinearUpscaling">
|
||||
<property name="text">
|
||||
<string>Linear Upscaling</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="userIntegerUpscaling">
|
||||
<property name="text">
|
||||
<string>Integer Upscaling</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="title">
|
||||
<string>GPU Enhancements</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Resolution Scale:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="userResolutionScale"/>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="userTrueColor">
|
||||
<property name="text">
|
||||
<string>True Color Rendering (24-bit, disables dithering)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="userScaledDithering">
|
||||
<property name="text">
|
||||
<string>Scaled Dithering (scale dither pattern to resolution)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="userWidescreenHack">
|
||||
<property name="text">
|
||||
<string>Widescreen Hack</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="userForceNTSCTimings">
|
||||
<property name="text">
|
||||
<string>Force NTSC Timings (60hz-on-PAL)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="userBilinearTextureFiltering">
|
||||
<property name="text">
|
||||
<string>Bilinear Texture Filtering</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="userPGXP">
|
||||
<property name="text">
|
||||
<string>PGXP Geometry Correction</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -256,7 +349,78 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
<string>Memory Card Settings</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Memory Card 1 Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="userMemoryCard1Type"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Memory Card 1 Shared Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="userMemoryCard1SharedPath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="userMemoryCard1SharedPathBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>Memory Card 2 Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="userMemoryCard2Type"/>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Memory Card 2 Shared Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="userMemoryCard2SharedPath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="userMemoryCard2SharedPathBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "gpusettingswidget.h"
|
||||
#include "core/gpu.h"
|
||||
#include "core/settings.h"
|
||||
#include "qtutils.h"
|
||||
#include "settingsdialog.h"
|
||||
#include "settingwidgetbinder.h"
|
||||
|
||||
@ -62,14 +63,15 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.renderer, tr("Renderer"), Settings::GetRendererDisplayName(Settings::DEFAULT_GPU_RENDERER),
|
||||
tr(
|
||||
"Chooses the backend to use for rendering the console/game visuals. <br>Depending on your system and hardware, "
|
||||
"Direct3D 11 and OpenGL hardware backends may be available. <br>The software renderer offers the best compatibility, "
|
||||
"but is the slowest and does not offer any enhancements."));
|
||||
tr("Chooses the backend to use for rendering the console/game visuals. <br>Depending on your system and hardware, "
|
||||
"Direct3D 11 and OpenGL hardware backends may be available. <br>The software renderer offers the best "
|
||||
"compatibility, "
|
||||
"but is the slowest and does not offer any enhancements."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.adapter, tr("Adapter"), tr("(Default)"),
|
||||
tr("If your system contains multiple GPUs or adapters, you can select which GPU you wish to use for the hardware "
|
||||
"renderers. <br>This option is only supported in Direct3D and Vulkan. OpenGL will always use the default device."));
|
||||
"renderers. <br>This option is only supported in Direct3D and Vulkan. OpenGL will always use the default "
|
||||
"device."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.displayAspectRatio, tr("Aspect Ratio"), QStringLiteral("4:3"),
|
||||
tr("Changes the aspect ratio used to display the console's output to the screen. The default "
|
||||
@ -82,14 +84,16 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
|
||||
"compromise between stability and hiding black borders."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.disableInterlacing, tr("Disable Interlacing (force progressive render/scan)"), tr("Unchecked"),
|
||||
tr("Forces the rendering and display of frames to progressive mode. <br>This removes the \"combing\" effect seen in "
|
||||
"480i games by rendering them in 480p. Usually safe to enable.<br> "
|
||||
"<b><u>May not be compatible with all games.</u></b>"));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.displayLinearFiltering, tr("Linear Upscaling"), tr("Checked"),
|
||||
tr("Uses bilinear texture filtering when displaying the console's framebuffer to the screen. <br>Disabling filtering "
|
||||
"will producer a sharper, blockier/pixelated image. Enabling will smooth out the image. <br>The option will be less "
|
||||
"noticable the higher the resolution scale."));
|
||||
tr(
|
||||
"Forces the rendering and display of frames to progressive mode. <br>This removes the \"combing\" effect seen in "
|
||||
"480i games by rendering them in 480p. Usually safe to enable.<br> "
|
||||
"<b><u>May not be compatible with all games.</u></b>"));
|
||||
dialog->registerWidgetHelp(m_ui.displayLinearFiltering, tr("Linear Upscaling"), tr("Checked"),
|
||||
tr("Uses bilinear texture filtering when displaying the console's framebuffer to the "
|
||||
"screen. <br>Disabling filtering "
|
||||
"will producer a sharper, blockier/pixelated image. Enabling will smooth out the "
|
||||
"image. <br>The option will be less "
|
||||
"noticable the higher the resolution scale."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.displayIntegerScaling, tr("Integer Upscaling"), tr("Unchecked"),
|
||||
tr("Adds padding to the display area to ensure that the ratio between pixels on the host to "
|
||||
@ -114,12 +118,12 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
|
||||
m_ui.scaledDithering, tr("Scaled Dithering (scale dither pattern to resolution)"), tr("Checked"),
|
||||
tr("Scales the dither pattern to the resolution scale of the emulated GPU. This makes the dither pattern much less "
|
||||
"obvious at higher resolutions. <br>Usually safe to enable, and only supported by the hardware renderers."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.forceNTSCTimings, tr("Force NTSC Timings (60hz-on-PAL)"), tr("Unchecked"),
|
||||
tr(
|
||||
"Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at 60hz. <br>For most games which "
|
||||
"have a speed tied to the framerate, this will result in the game running approximately 17% faster. <br>For variable "
|
||||
"frame rate games, it may not affect the speed."));
|
||||
dialog->registerWidgetHelp(m_ui.forceNTSCTimings, tr("Force NTSC Timings (60hz-on-PAL)"), tr("Unchecked"),
|
||||
tr("Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at "
|
||||
"60hz. <br>For most games which "
|
||||
"have a speed tied to the framerate, this will result in the game running "
|
||||
"approximately 17% faster. <br>For variable "
|
||||
"frame rate games, it may not affect the speed."));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.linearTextureFiltering, tr("Bilinear Texture Filtering"), tr("Unchecked"),
|
||||
tr("Smooths out the blockyness of magnified textures on 3D object by using bilinear filtering. <br>Will have a "
|
||||
@ -128,7 +132,8 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
|
||||
m_ui.widescreenHack, tr("Widescreen Hack"), tr("Unchecked"),
|
||||
tr("Scales vertex positions in screen-space to a widescreen aspect ratio, essentially "
|
||||
"increasing the field of view from 4:3 to 16:9 in 3D games. <br>For 2D games, or games which "
|
||||
"use pre-rendered backgrounds, this enhancement will not work as expected. <br><b><u>May not be compatible with all games.</u></b>"));
|
||||
"use pre-rendered backgrounds, this enhancement will not work as expected. <br><b><u>May not be compatible with "
|
||||
"all games.</u></b>"));
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.pgxpEnable, tr("Geometry Correction"), tr("Unchecked"),
|
||||
tr("Reduces \"wobbly\" polygons and \"warping\" textures that are common in PS1 games. <br>Only "
|
||||
@ -178,29 +183,7 @@ void GPUSettingsWidget::setupAdditionalUi()
|
||||
qApp->translate("DisplayCropMode", Settings::GetDisplayCropModeDisplayName(static_cast<DisplayCropMode>(i))));
|
||||
}
|
||||
|
||||
std::array<QString, GPU::MAX_RESOLUTION_SCALE + 1> resolution_suffixes = {{
|
||||
QString(), // auto
|
||||
QString(), // 1x
|
||||
QString(), // 2x
|
||||
tr(" (for 720p)"), // 3x
|
||||
QString(), // 4x
|
||||
tr(" (for 1080p)"), // 5x
|
||||
tr(" (for 1440p)"), // 6x
|
||||
QString(), // 7x
|
||||
QString(), // 8x
|
||||
tr(" (for 4K)"), // 9x
|
||||
QString(), // 10x
|
||||
QString(), // 11x
|
||||
QString(), // 12x
|
||||
QString(), // 13x
|
||||
QString(), // 14x
|
||||
QString(), // 15x
|
||||
QString() // 16x
|
||||
}};
|
||||
|
||||
m_ui.resolutionScale->addItem(tr("Automatic based on window size"));
|
||||
for (u32 i = 1; i <= GPU::MAX_RESOLUTION_SCALE; i++)
|
||||
m_ui.resolutionScale->addItem(tr("%1x%2").arg(i).arg(resolution_suffixes[i]));
|
||||
QtUtils::FillComboBoxWithResolutionScales(m_ui.resolutionScale);
|
||||
}
|
||||
|
||||
void GPUSettingsWidget::populateGPUAdapters()
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "qtutils.h"
|
||||
#include "common/byte_stream.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QMetaObject>
|
||||
#include <QtGui/QDesktopServices>
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
@ -646,4 +648,25 @@ void OpenURL(QWidget* parent, const char* url)
|
||||
return OpenURL(parent, QUrl::fromEncoded(QByteArray(url, static_cast<int>(std::strlen(url)))));
|
||||
}
|
||||
|
||||
void FillComboBoxWithResolutionScales(QComboBox* cb)
|
||||
{
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "Automatic based on window size"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "1x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "2x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "3x (for 720p)"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "4x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "5x (for 1080p)"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "6x (for 1440p)"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "7x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "8x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "9x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "10x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "11x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "12x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "13x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "14x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "15x"));
|
||||
cb->addItem(qApp->translate("GPUSettingsWidget", "16x"));
|
||||
}
|
||||
|
||||
} // namespace QtUtils
|
@ -9,6 +9,7 @@ Q_DECLARE_METATYPE(std::optional<bool>);
|
||||
|
||||
class ByteStream;
|
||||
|
||||
class QComboBox;
|
||||
class QFrame;
|
||||
class QKeyEvent;
|
||||
class QTableView;
|
||||
@ -54,4 +55,7 @@ void OpenURL(QWidget* parent, const QUrl& qurl);
|
||||
/// Opens a URL string with the default handler.
|
||||
void OpenURL(QWidget* parent, const char* url);
|
||||
|
||||
/// Fills a combo box with resolution scale options.
|
||||
void FillComboBoxWithResolutionScales(QComboBox* cb);
|
||||
|
||||
} // namespace QtUtils
|
Reference in New Issue
Block a user