configure_graphics: Partial runtime implementation
This commit is contained in:
parent
75d7e40113
commit
f8435d676f
|
@ -733,7 +733,7 @@ struct Values {
|
||||||
linkage, ShaderBackend::GLSL, ShaderBackend::GLSL, ShaderBackend::SPIRV,
|
linkage, ShaderBackend::GLSL, ShaderBackend::GLSL, ShaderBackend::SPIRV,
|
||||||
"shader_backend", Category::Renderer};
|
"shader_backend", Category::Renderer};
|
||||||
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
||||||
Category::Renderer};
|
Category::RendererAdvanced};
|
||||||
SwitchableSetting<bool, false, true, true> use_fast_gpu_time{linkage, true, "use_fast_gpu_time",
|
SwitchableSetting<bool, false, true, true> use_fast_gpu_time{linkage, true, "use_fast_gpu_time",
|
||||||
Category::RendererAdvanced};
|
Category::RendererAdvanced};
|
||||||
SwitchableSetting<bool, false, true, true> use_vulkan_driver_pipeline_cache{
|
SwitchableSetting<bool, false, true, true> use_vulkan_driver_pipeline_cache{
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
@ -55,9 +56,8 @@ static std::pair<QWidget*, std::function<void()>> CreateCheckBox(Settings::Basic
|
||||||
return {checkbox, load_func};
|
return {checkbox, load_func};
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::pair<QWidget*, std::function<void()>> CreateCombobox(Settings::BasicSetting* setting,
|
static std::tuple<QWidget*, void*, std::function<void()>> CreateCombobox(
|
||||||
const QString& label,
|
Settings::BasicSetting* setting, const QString& label, QWidget* parent) {
|
||||||
QWidget* parent) {
|
|
||||||
const auto type = setting->TypeId();
|
const auto type = setting->TypeId();
|
||||||
|
|
||||||
QWidget* group = new QWidget(parent);
|
QWidget* group = new QWidget(parent);
|
||||||
|
@ -110,15 +110,34 @@ static std::pair<QWidget*, std::function<void()>> CreateCombobox(Settings::Basic
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {group, load_func};
|
return {group, combobox, load_func};
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& translations,
|
static std::tuple<QWidget*, void*, std::function<void()>> CreateLineEdit(
|
||||||
QWidget* parent, bool runtime_lock,
|
Settings::BasicSetting* setting, const QString& label, QWidget* parent) {
|
||||||
|
QWidget* widget = new QWidget(parent);
|
||||||
|
QHBoxLayout* layout = new QHBoxLayout(widget);
|
||||||
|
|
||||||
|
QLabel* q_label = new QLabel(label, widget);
|
||||||
|
QLineEdit* line_edit = new QLineEdit(widget);
|
||||||
|
|
||||||
|
layout->addWidget(q_label);
|
||||||
|
layout->addStretch();
|
||||||
|
layout->addWidget(line_edit);
|
||||||
|
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
return {widget, line_edit, []() {}};
|
||||||
|
}
|
||||||
|
|
||||||
|
std::pair<QWidget*, void*> CreateWidget(Settings::BasicSetting* setting,
|
||||||
|
const TranslationMap& translations, QWidget* parent,
|
||||||
|
bool runtime_lock,
|
||||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||||
std::list<CheckState>& trackers) {
|
std::list<CheckState>& trackers, RequestType request) {
|
||||||
const auto type = setting->TypeId();
|
const auto type = setting->TypeId();
|
||||||
QWidget* widget{nullptr};
|
QWidget* widget{nullptr};
|
||||||
|
void* extra{nullptr};
|
||||||
|
|
||||||
std::function<void()> load_func;
|
std::function<void()> load_func;
|
||||||
|
|
||||||
|
@ -135,7 +154,7 @@ QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& tra
|
||||||
if (label == QStringLiteral("")) {
|
if (label == QStringLiteral("")) {
|
||||||
LOG_DEBUG(Frontend, "Translation table has emtpy entry for \"{}\", skipping...",
|
LOG_DEBUG(Frontend, "Translation table has emtpy entry for \"{}\", skipping...",
|
||||||
setting->GetLabel());
|
setting->GetLabel());
|
||||||
return widget;
|
return {nullptr, nullptr};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == typeid(bool)) {
|
if (type == typeid(bool)) {
|
||||||
|
@ -143,14 +162,36 @@ QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& tra
|
||||||
widget = pair.first;
|
widget = pair.first;
|
||||||
load_func = pair.second;
|
load_func = pair.second;
|
||||||
} else if (setting->IsEnum()) {
|
} else if (setting->IsEnum()) {
|
||||||
auto pair = CreateCombobox(setting, label, parent);
|
auto tuple = CreateCombobox(setting, label, parent);
|
||||||
widget = pair.first;
|
widget = std::get<0>(tuple);
|
||||||
load_func = pair.second;
|
extra = std::get<1>(tuple);
|
||||||
|
load_func = std::get<2>(tuple);
|
||||||
|
} else if (type == typeid(u32) || type == typeid(int)) {
|
||||||
|
switch (request) {
|
||||||
|
case RequestType::Default: {
|
||||||
|
auto tuple = CreateLineEdit(setting, label, parent);
|
||||||
|
widget = std::get<0>(tuple);
|
||||||
|
extra = std::get<1>(tuple);
|
||||||
|
load_func = std::get<2>(tuple);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RequestType::ComboBox: {
|
||||||
|
auto tuple = CreateCombobox(setting, label, parent);
|
||||||
|
widget = std::get<0>(tuple);
|
||||||
|
extra = std::get<1>(tuple);
|
||||||
|
load_func = std::get<2>(tuple);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RequestType::SpinBox:
|
||||||
|
case RequestType::Slider:
|
||||||
|
case RequestType::MaxEnum:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widget == nullptr) {
|
if (widget == nullptr) {
|
||||||
LOG_ERROR(Frontend, "No widget was created for \"{}\"", setting->GetLabel());
|
LOG_ERROR(Frontend, "No widget was created for \"{}\"", setting->GetLabel());
|
||||||
return widget;
|
return {nullptr, nullptr};
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_funcs.push_front([load_func, setting](bool powered_on) {
|
apply_funcs.push_front([load_func, setting](bool powered_on) {
|
||||||
|
@ -162,13 +203,14 @@ QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& tra
|
||||||
bool enable = runtime_lock || setting->RuntimeModfiable();
|
bool enable = runtime_lock || setting->RuntimeModfiable();
|
||||||
enable &=
|
enable &=
|
||||||
setting->Switchable() && !(Settings::IsConfiguringGlobal() && !setting->UsingGlobal());
|
setting->Switchable() && !(Settings::IsConfiguringGlobal() && !setting->UsingGlobal());
|
||||||
|
enable |= !setting->Switchable() && Settings::IsConfiguringGlobal() && runtime_lock;
|
||||||
widget->setEnabled(enable);
|
widget->setEnabled(enable);
|
||||||
|
|
||||||
widget->setVisible(Settings::IsConfiguringGlobal() || setting->Switchable());
|
widget->setVisible(Settings::IsConfiguringGlobal() || setting->Switchable());
|
||||||
|
|
||||||
widget->setToolTip(tooltip);
|
widget->setToolTip(tooltip);
|
||||||
|
|
||||||
return widget;
|
return {widget, extra};
|
||||||
}
|
}
|
||||||
|
|
||||||
Tab::Tab(std::shared_ptr<std::forward_list<Tab*>> group_, QWidget* parent)
|
Tab::Tab(std::shared_ptr<std::forward_list<Tab*>> group_, QWidget* parent)
|
||||||
|
|
|
@ -41,10 +41,20 @@ enum class CheckState {
|
||||||
Count, // Simply the number of states, not a valid checkbox state
|
Count, // Simply the number of states, not a valid checkbox state
|
||||||
};
|
};
|
||||||
|
|
||||||
QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& translations,
|
enum class RequestType {
|
||||||
QWidget* parent, bool runtime_lock,
|
Default,
|
||||||
|
ComboBox,
|
||||||
|
SpinBox,
|
||||||
|
Slider,
|
||||||
|
MaxEnum,
|
||||||
|
};
|
||||||
|
|
||||||
|
std::pair<QWidget*, void*> CreateWidget(Settings::BasicSetting* setting,
|
||||||
|
const TranslationMap& translations, QWidget* parent,
|
||||||
|
bool runtime_lock,
|
||||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||||
std::list<CheckState>& trackers);
|
std::list<CheckState>& trackers,
|
||||||
|
RequestType request = RequestType::Default);
|
||||||
|
|
||||||
// Global-aware apply and set functions
|
// Global-aware apply and set functions
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
||||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *translations, this)},
|
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *translations, this)},
|
||||||
graphics_tab{std::make_unique<ConfigureGraphics>(
|
graphics_tab{std::make_unique<ConfigureGraphics>(
|
||||||
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
||||||
nullptr, this)},
|
nullptr, *translations, this)},
|
||||||
hotkeys_tab{std::make_unique<ConfigureHotkeys>(system_.HIDCore(), this)},
|
hotkeys_tab{std::make_unique<ConfigureHotkeys>(system_.HIDCore(), this)},
|
||||||
input_tab{std::make_unique<ConfigureInput>(system_, this)},
|
input_tab{std::make_unique<ConfigureInput>(system_, this)},
|
||||||
network_tab{std::make_unique<ConfigureNetwork>(system_, this)},
|
network_tab{std::make_unique<ConfigureNetwork>(system_, this)},
|
||||||
|
|
|
@ -55,100 +55,123 @@ static constexpr VkPresentModeKHR VSyncSettingToMode(Settings::VSyncMode mode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr Settings::VSyncMode PresentModeToSetting(VkPresentModeKHR mode) {
|
// static constexpr Settings::VSyncMode PresentModeToSetting(VkPresentModeKHR mode) {
|
||||||
switch (mode) {
|
// switch (mode) {
|
||||||
case VK_PRESENT_MODE_IMMEDIATE_KHR:
|
// case VK_PRESENT_MODE_IMMEDIATE_KHR:
|
||||||
return Settings::VSyncMode::Immediate;
|
// return Settings::VSyncMode::Immediate;
|
||||||
case VK_PRESENT_MODE_MAILBOX_KHR:
|
// case VK_PRESENT_MODE_MAILBOX_KHR:
|
||||||
return Settings::VSyncMode::Mailbox;
|
// return Settings::VSyncMode::Mailbox;
|
||||||
case VK_PRESENT_MODE_FIFO_KHR:
|
// case VK_PRESENT_MODE_FIFO_KHR:
|
||||||
return Settings::VSyncMode::FIFO;
|
// return Settings::VSyncMode::FIFO;
|
||||||
case VK_PRESENT_MODE_FIFO_RELAXED_KHR:
|
// case VK_PRESENT_MODE_FIFO_RELAXED_KHR:
|
||||||
return Settings::VSyncMode::FIFORelaxed;
|
// return Settings::VSyncMode::FIFORelaxed;
|
||||||
default:
|
// default:
|
||||||
return Settings::VSyncMode::FIFO;
|
// return Settings::VSyncMode::FIFO;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
ConfigureGraphics::ConfigureGraphics(
|
ConfigureGraphics::ConfigureGraphics(
|
||||||
const Core::System& system_, std::vector<VkDeviceInfo::Record>& records_,
|
const Core::System& system_, std::vector<VkDeviceInfo::Record>& records_,
|
||||||
const std::function<void()>& expose_compute_option_,
|
const std::function<void()>& expose_compute_option_,
|
||||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group, QWidget* parent)
|
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||||
|
const ConfigurationShared::TranslationMap& translations_, QWidget* parent)
|
||||||
: ConfigurationShared::Tab(group, parent), ui{std::make_unique<Ui::ConfigureGraphics>()},
|
: ConfigurationShared::Tab(group, parent), ui{std::make_unique<Ui::ConfigureGraphics>()},
|
||||||
records{records_}, expose_compute_option{expose_compute_option_}, system{system_} {
|
records{records_}, expose_compute_option{expose_compute_option_}, system{system_},
|
||||||
|
translations{translations_} {
|
||||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||||
RetrieveVulkanDevices();
|
RetrieveVulkanDevices();
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
SetConfiguration();
|
||||||
|
|
||||||
for (const auto& device : vulkan_devices) {
|
for (const auto& device : vulkan_devices) {
|
||||||
ui->device->addItem(device);
|
vulkan_device_combobox->addItem(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->backend->addItem(QStringLiteral("GLSL"));
|
UpdateBackgroundColorButton(QColor::fromRgb(Settings::values.bg_red.GetValue(),
|
||||||
ui->backend->addItem(tr("GLASM (Assembly Shaders, NVIDIA Only)"));
|
Settings::values.bg_green.GetValue(),
|
||||||
ui->backend->addItem(tr("SPIR-V (Experimental, Mesa Only)"));
|
Settings::values.bg_blue.GetValue()));
|
||||||
|
UpdateAPILayout();
|
||||||
|
PopulateVSyncModeSelection(); //< must happen after UpdateAPILayout
|
||||||
|
// SetFSRIndicatorText(ui->fsr_sharpening_slider->sliderPosition());
|
||||||
|
|
||||||
|
// VSync setting needs to be determined after populating the VSync combobox
|
||||||
|
if (Settings::IsConfiguringGlobal()) {
|
||||||
|
const auto vsync_mode_setting = Settings::values.vsync_mode.GetValue();
|
||||||
|
const auto vsync_mode = VSyncSettingToMode(vsync_mode_setting);
|
||||||
|
int index{};
|
||||||
|
for (const auto mode : vsync_mode_combobox_enum_map) {
|
||||||
|
if (mode == vsync_mode) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
if (static_cast<unsigned long>(index) < vsync_mode_combobox_enum_map.size()) {
|
||||||
|
vsync_mode_combobox->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetupPerGameUI();
|
SetupPerGameUI();
|
||||||
|
|
||||||
SetConfiguration();
|
connect(api_combobox, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] {
|
||||||
|
|
||||||
connect(ui->api, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] {
|
|
||||||
UpdateAPILayout();
|
UpdateAPILayout();
|
||||||
PopulateVSyncModeSelection();
|
PopulateVSyncModeSelection();
|
||||||
if (!Settings::IsConfiguringGlobal()) {
|
if (!Settings::IsConfiguringGlobal()) {
|
||||||
ConfigurationShared::SetHighlight(
|
ConfigurationShared::SetHighlight(ui->api_widget,
|
||||||
ui->api_widget, ui->api->currentIndex() != ConfigurationShared::USE_GLOBAL_INDEX);
|
api_combobox->currentIndex() !=
|
||||||
|
ConfigurationShared::USE_GLOBAL_INDEX);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(ui->device, qOverload<int>(&QComboBox::activated), this, [this](int device) {
|
connect(vulkan_device_combobox, qOverload<int>(&QComboBox::activated), this,
|
||||||
|
[this](int device) {
|
||||||
UpdateDeviceSelection(device);
|
UpdateDeviceSelection(device);
|
||||||
PopulateVSyncModeSelection();
|
PopulateVSyncModeSelection();
|
||||||
});
|
});
|
||||||
connect(ui->backend, qOverload<int>(&QComboBox::activated), this,
|
connect(shader_backend_combobox, qOverload<int>(&QComboBox::activated), this,
|
||||||
[this](int backend) { UpdateShaderBackendSelection(backend); });
|
[this](int backend) { UpdateShaderBackendSelection(backend); });
|
||||||
|
|
||||||
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
// connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
||||||
const QColor new_bg_color = QColorDialog::getColor(bg_color);
|
// const QColor new_bg_color = QColorDialog::getColor(bg_color);
|
||||||
if (!new_bg_color.isValid()) {
|
// if (!new_bg_color.isValid()) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
UpdateBackgroundColorButton(new_bg_color);
|
// UpdateBackgroundColorButton(new_bg_color);
|
||||||
});
|
// });
|
||||||
|
|
||||||
ui->api->setEnabled(!UISettings::values.has_broken_vulkan && ui->api->isEnabled());
|
api_combobox->setEnabled(!UISettings::values.has_broken_vulkan && api_combobox->isEnabled());
|
||||||
ui->api_widget->setEnabled(
|
ui->api_widget->setEnabled(
|
||||||
(!UISettings::values.has_broken_vulkan || Settings::IsConfiguringGlobal()) &&
|
(!UISettings::values.has_broken_vulkan || Settings::IsConfiguringGlobal()) &&
|
||||||
ui->api_widget->isEnabled());
|
ui->api_widget->isEnabled());
|
||||||
ui->bg_label->setVisible(Settings::IsConfiguringGlobal());
|
// ui->bg_label->setVisible(Settings::IsConfiguringGlobal());
|
||||||
ui->bg_combobox->setVisible(!Settings::IsConfiguringGlobal());
|
// ui->bg_combobox->setVisible(!Settings::IsConfiguringGlobal());
|
||||||
|
|
||||||
connect(ui->fsr_sharpening_slider, &QSlider::valueChanged, this,
|
// connect(ui->fsr_sharpening_slider, &QSlider::valueChanged, this,
|
||||||
&ConfigureGraphics::SetFSRIndicatorText);
|
// &ConfigureGraphics::SetFSRIndicatorText);
|
||||||
ui->fsr_sharpening_combobox->setVisible(!Settings::IsConfiguringGlobal());
|
// ui->fsr_sharpening_combobox->setVisible(!Settings::IsConfiguringGlobal());
|
||||||
ui->fsr_sharpening_label->setVisible(Settings::IsConfiguringGlobal());
|
// ui->fsr_sharpening_label->setVisible(Settings::IsConfiguringGlobal());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::PopulateVSyncModeSelection() {
|
void ConfigureGraphics::PopulateVSyncModeSelection() {
|
||||||
const Settings::RendererBackend backend{GetCurrentGraphicsBackend()};
|
const Settings::RendererBackend backend{GetCurrentGraphicsBackend()};
|
||||||
if (backend == Settings::RendererBackend::Null) {
|
if (backend == Settings::RendererBackend::Null) {
|
||||||
ui->vsync_mode_combobox->setEnabled(false);
|
vsync_mode_combobox->setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ui->vsync_mode_combobox->setEnabled(true);
|
vsync_mode_combobox->setEnabled(true);
|
||||||
|
|
||||||
const int current_index = //< current selected vsync mode from combobox
|
const int current_index = //< current selected vsync mode from combobox
|
||||||
ui->vsync_mode_combobox->currentIndex();
|
vsync_mode_combobox->currentIndex();
|
||||||
const auto current_mode = //< current selected vsync mode as a VkPresentModeKHR
|
const auto current_mode = //< current selected vsync mode as a VkPresentModeKHR
|
||||||
current_index == -1 ? VSyncSettingToMode(Settings::values.vsync_mode.GetValue())
|
current_index == -1 ? VSyncSettingToMode(Settings::values.vsync_mode.GetValue())
|
||||||
: vsync_mode_combobox_enum_map[current_index];
|
: vsync_mode_combobox_enum_map[current_index];
|
||||||
int index{};
|
int index{};
|
||||||
const int device{ui->device->currentIndex()}; //< current selected Vulkan device
|
const int device{vulkan_device_combobox->currentIndex()}; //< current selected Vulkan device
|
||||||
const auto& present_modes = //< relevant vector of present modes for the selected device or API
|
const auto& present_modes = //< relevant vector of present modes for the selected device or API
|
||||||
backend == Settings::RendererBackend::Vulkan ? device_present_modes[device]
|
backend == Settings::RendererBackend::Vulkan ? device_present_modes[device]
|
||||||
: default_present_modes;
|
: default_present_modes;
|
||||||
|
|
||||||
ui->vsync_mode_combobox->clear();
|
vsync_mode_combobox->clear();
|
||||||
vsync_mode_combobox_enum_map.clear();
|
vsync_mode_combobox_enum_map.clear();
|
||||||
vsync_mode_combobox_enum_map.reserve(present_modes.size());
|
vsync_mode_combobox_enum_map.reserve(present_modes.size());
|
||||||
for (const auto present_mode : present_modes) {
|
for (const auto present_mode : present_modes) {
|
||||||
|
@ -157,10 +180,10 @@ void ConfigureGraphics::PopulateVSyncModeSelection() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->vsync_mode_combobox->insertItem(index, mode_name);
|
vsync_mode_combobox->insertItem(index, mode_name);
|
||||||
vsync_mode_combobox_enum_map.push_back(present_mode);
|
vsync_mode_combobox_enum_map.push_back(present_mode);
|
||||||
if (present_mode == current_mode) {
|
if (present_mode == current_mode) {
|
||||||
ui->vsync_mode_combobox->setCurrentIndex(index);
|
vsync_mode_combobox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
@ -188,114 +211,137 @@ ConfigureGraphics::~ConfigureGraphics() = default;
|
||||||
|
|
||||||
void ConfigureGraphics::SetConfiguration() {
|
void ConfigureGraphics::SetConfiguration() {
|
||||||
const bool runtime_lock = !system.IsPoweredOn();
|
const bool runtime_lock = !system.IsPoweredOn();
|
||||||
|
QLayout& api_layout = *ui->api_widget->layout();
|
||||||
|
QLayout& graphics_layout = *ui->graphics_widget->layout();
|
||||||
|
|
||||||
ui->api_widget->setEnabled(runtime_lock);
|
std::map<std::string, QWidget*> hold_graphics;
|
||||||
ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock);
|
|
||||||
ui->use_disk_shader_cache->setEnabled(runtime_lock);
|
|
||||||
ui->nvdec_emulation_widget->setEnabled(runtime_lock);
|
|
||||||
ui->resolution_combobox->setEnabled(runtime_lock);
|
|
||||||
ui->astc_decode_mode_combobox->setEnabled(runtime_lock);
|
|
||||||
ui->vsync_mode_layout->setEnabled(runtime_lock ||
|
|
||||||
Settings::values.renderer_backend.GetValue() ==
|
|
||||||
Settings::RendererBackend::Vulkan);
|
|
||||||
ui->use_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache.GetValue());
|
|
||||||
ui->use_asynchronous_gpu_emulation->setChecked(
|
|
||||||
Settings::values.use_asynchronous_gpu_emulation.GetValue());
|
|
||||||
|
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
for (const auto setting : Settings::values.linkage.by_category[Settings::Category::Renderer]) {
|
||||||
ui->api->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend.GetValue()));
|
const auto& setting_label = setting->GetLabel();
|
||||||
ui->fullscreen_mode_combobox->setCurrentIndex(
|
|
||||||
static_cast<int>(Settings::values.fullscreen_mode.GetValue()));
|
auto [widget, extra] = [&]() {
|
||||||
ui->nvdec_emulation->setCurrentIndex(
|
if (setting_label == "vulkan_device") {
|
||||||
static_cast<int>(Settings::values.nvdec_emulation.GetValue()));
|
return ConfigurationShared::CreateWidget(
|
||||||
ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue());
|
setting, translations, this, runtime_lock, apply_funcs, trackers,
|
||||||
ui->resolution_combobox->setCurrentIndex(
|
ConfigurationShared::RequestType::ComboBox);
|
||||||
static_cast<int>(Settings::values.resolution_setup.GetValue()));
|
}
|
||||||
ui->scaling_filter_combobox->setCurrentIndex(
|
return ConfigurationShared::CreateWidget(setting, translations, this, runtime_lock,
|
||||||
static_cast<int>(Settings::values.scaling_filter.GetValue()));
|
apply_funcs, trackers);
|
||||||
ui->fsr_sharpening_slider->setValue(Settings::values.fsr_sharpening_slider.GetValue());
|
}();
|
||||||
ui->anti_aliasing_combobox->setCurrentIndex(
|
|
||||||
static_cast<int>(Settings::values.anti_aliasing.GetValue()));
|
if (widget == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (setting_label == "backend") {
|
||||||
|
api_layout.addWidget(widget);
|
||||||
|
api_combobox = reinterpret_cast<QComboBox*>(extra);
|
||||||
|
} else if (setting_label == "vulkan_device") {
|
||||||
|
api_layout.addWidget(widget);
|
||||||
|
vulkan_device_combobox = reinterpret_cast<QComboBox*>(extra);
|
||||||
|
vulkan_device_widget = widget;
|
||||||
|
} else if (setting_label == "shader_backend") {
|
||||||
|
api_layout.addWidget(widget);
|
||||||
|
shader_backend_combobox = reinterpret_cast<QComboBox*>(extra);
|
||||||
|
shader_backend_widget = widget;
|
||||||
} else {
|
} else {
|
||||||
ConfigurationShared::SetPerGameSetting(ui->api, &Settings::values.renderer_backend);
|
hold_graphics.insert(std::pair(setting_label, widget));
|
||||||
ConfigurationShared::SetHighlight(ui->api_widget,
|
|
||||||
!Settings::values.renderer_backend.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->astc_decode_mode_combobox,
|
|
||||||
&Settings::values.accelerate_astc);
|
|
||||||
ConfigurationShared::SetHighlight(ui->astc_decode_mode_layout,
|
|
||||||
!Settings::values.accelerate_astc.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->nvdec_emulation,
|
|
||||||
&Settings::values.nvdec_emulation);
|
|
||||||
ConfigurationShared::SetHighlight(ui->nvdec_emulation_widget,
|
|
||||||
!Settings::values.nvdec_emulation.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->fullscreen_mode_combobox,
|
|
||||||
&Settings::values.fullscreen_mode);
|
|
||||||
ConfigurationShared::SetHighlight(ui->fullscreen_mode_label,
|
|
||||||
!Settings::values.fullscreen_mode.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->aspect_ratio_combobox,
|
|
||||||
&Settings::values.aspect_ratio);
|
|
||||||
ConfigurationShared::SetHighlight(ui->ar_label,
|
|
||||||
!Settings::values.aspect_ratio.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->resolution_combobox,
|
|
||||||
&Settings::values.resolution_setup);
|
|
||||||
ConfigurationShared::SetHighlight(ui->resolution_label,
|
|
||||||
!Settings::values.resolution_setup.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->scaling_filter_combobox,
|
|
||||||
&Settings::values.scaling_filter);
|
|
||||||
ConfigurationShared::SetHighlight(ui->scaling_filter_label,
|
|
||||||
!Settings::values.scaling_filter.UsingGlobal());
|
|
||||||
|
|
||||||
ConfigurationShared::SetPerGameSetting(ui->anti_aliasing_combobox,
|
|
||||||
&Settings::values.anti_aliasing);
|
|
||||||
ConfigurationShared::SetHighlight(ui->anti_aliasing_label,
|
|
||||||
!Settings::values.anti_aliasing.UsingGlobal());
|
|
||||||
|
|
||||||
ui->fsr_sharpening_combobox->setCurrentIndex(
|
|
||||||
Settings::values.fsr_sharpening_slider.UsingGlobal() ? 0 : 1);
|
|
||||||
ui->fsr_sharpening_slider->setEnabled(
|
|
||||||
!Settings::values.fsr_sharpening_slider.UsingGlobal());
|
|
||||||
ui->fsr_sharpening_value->setEnabled(!Settings::values.fsr_sharpening_slider.UsingGlobal());
|
|
||||||
ConfigurationShared::SetHighlight(ui->fsr_sharpening_layout,
|
|
||||||
!Settings::values.fsr_sharpening_slider.UsingGlobal());
|
|
||||||
ui->fsr_sharpening_slider->setValue(Settings::values.fsr_sharpening_slider.GetValue());
|
|
||||||
|
|
||||||
ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1);
|
|
||||||
ui->bg_button->setEnabled(!Settings::values.bg_red.UsingGlobal());
|
|
||||||
ConfigurationShared::SetHighlight(ui->bg_layout, !Settings::values.bg_red.UsingGlobal());
|
|
||||||
}
|
}
|
||||||
UpdateBackgroundColorButton(QColor::fromRgb(Settings::values.bg_red.GetValue(),
|
|
||||||
Settings::values.bg_green.GetValue(),
|
|
||||||
Settings::values.bg_blue.GetValue()));
|
|
||||||
UpdateAPILayout();
|
|
||||||
PopulateVSyncModeSelection(); //< must happen after UpdateAPILayout
|
|
||||||
SetFSRIndicatorText(ui->fsr_sharpening_slider->sliderPosition());
|
|
||||||
|
|
||||||
// VSync setting needs to be determined after populating the VSync combobox
|
if (setting_label == "use_vsync") {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
vsync_mode_combobox = reinterpret_cast<QComboBox*>(extra);
|
||||||
const auto vsync_mode_setting = Settings::values.vsync_mode.GetValue();
|
|
||||||
const auto vsync_mode = VSyncSettingToMode(vsync_mode_setting);
|
|
||||||
int index{};
|
|
||||||
for (const auto mode : vsync_mode_combobox_enum_map) {
|
|
||||||
if (mode == vsync_mode) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
if (static_cast<unsigned long>(index) < vsync_mode_combobox_enum_map.size()) {
|
|
||||||
ui->vsync_mode_combobox->setCurrentIndex(index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto& [label, widget] : hold_graphics) {
|
||||||
|
graphics_layout.addWidget(widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ui->api_widget->setEnabled(runtime_lock);
|
||||||
|
// ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock);
|
||||||
|
// ui->use_disk_shader_cache->setEnabled(runtime_lock);
|
||||||
|
// ui->nvdec_emulation_widget->setEnabled(runtime_lock);
|
||||||
|
// ui->resolution_combobox->setEnabled(runtime_lock);
|
||||||
|
// ui->astc_decode_mode_combobox->setEnabled(runtime_lock);
|
||||||
|
// ui->vsync_mode_layout->setEnabled(runtime_lock ||
|
||||||
|
// Settings::values.renderer_backend.GetValue() ==
|
||||||
|
// Settings::RendererBackend::Vulkan);
|
||||||
|
// ui->use_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache.GetValue());
|
||||||
|
// ui->use_asynchronous_gpu_emulation->setChecked(
|
||||||
|
// Settings::values.use_asynchronous_gpu_emulation.GetValue());
|
||||||
|
|
||||||
|
// if (Settings::IsConfiguringGlobal()) {
|
||||||
|
// api_combobox->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend.GetValue()));
|
||||||
|
// ui->fullscreen_mode_combobox->setCurrentIndex(
|
||||||
|
// static_cast<int>(Settings::values.fullscreen_mode.GetValue()));
|
||||||
|
// ui->nvdec_emulation->setCurrentIndex(
|
||||||
|
// static_cast<int>(Settings::values.nvdec_emulation.GetValue()));
|
||||||
|
// ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue());
|
||||||
|
// ui->resolution_combobox->setCurrentIndex(
|
||||||
|
// static_cast<int>(Settings::values.resolution_setup.GetValue()));
|
||||||
|
// ui->scaling_filter_combobox->setCurrentIndex(
|
||||||
|
// static_cast<int>(Settings::values.scaling_filter.GetValue()));
|
||||||
|
// ui->fsr_sharpening_slider->setValue(Settings::values.fsr_sharpening_slider.GetValue());
|
||||||
|
// ui->anti_aliasing_combobox->setCurrentIndex(
|
||||||
|
// static_cast<int>(Settings::values.anti_aliasing.GetValue()));
|
||||||
|
// } else {
|
||||||
|
// ConfigurationShared::SetPerGameSetting(api_combobox, &Settings::values.renderer_backend);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->api_widget,
|
||||||
|
// !Settings::values.renderer_backend.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->astc_decode_mode_combobox,
|
||||||
|
// &Settings::values.accelerate_astc);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->astc_decode_mode_layout,
|
||||||
|
// !Settings::values.accelerate_astc.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->nvdec_emulation,
|
||||||
|
// &Settings::values.nvdec_emulation);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->nvdec_emulation_widget,
|
||||||
|
// !Settings::values.nvdec_emulation.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->fullscreen_mode_combobox,
|
||||||
|
// &Settings::values.fullscreen_mode);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->fullscreen_mode_label,
|
||||||
|
// !Settings::values.fullscreen_mode.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->aspect_ratio_combobox,
|
||||||
|
// &Settings::values.aspect_ratio);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->ar_label,
|
||||||
|
// !Settings::values.aspect_ratio.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->resolution_combobox,
|
||||||
|
// &Settings::values.resolution_setup);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->resolution_label,
|
||||||
|
// !Settings::values.resolution_setup.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->scaling_filter_combobox,
|
||||||
|
// &Settings::values.scaling_filter);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->scaling_filter_label,
|
||||||
|
// !Settings::values.scaling_filter.UsingGlobal());
|
||||||
|
|
||||||
|
// ConfigurationShared::SetPerGameSetting(ui->anti_aliasing_combobox,
|
||||||
|
// &Settings::values.anti_aliasing);
|
||||||
|
// ConfigurationShared::SetHighlight(ui->anti_aliasing_label,
|
||||||
|
// !Settings::values.anti_aliasing.UsingGlobal());
|
||||||
|
|
||||||
|
// ui->fsr_sharpening_combobox->setCurrentIndex(
|
||||||
|
// Settings::values.fsr_sharpening_slider.UsingGlobal() ? 0 : 1);
|
||||||
|
// ui->fsr_sharpening_slider->setEnabled(
|
||||||
|
// !Settings::values.fsr_sharpening_slider.UsingGlobal());
|
||||||
|
// ui->fsr_sharpening_value->setEnabled(!Settings::values.fsr_sharpening_slider.UsingGlobal());
|
||||||
|
// ConfigurationShared::SetHighlight(ui->fsr_sharpening_layout,
|
||||||
|
// !Settings::values.fsr_sharpening_slider.UsingGlobal());
|
||||||
|
// ui->fsr_sharpening_slider->setValue(Settings::values.fsr_sharpening_slider.GetValue());
|
||||||
|
|
||||||
|
// ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1);
|
||||||
|
// ui->bg_button->setEnabled(!Settings::values.bg_red.UsingGlobal());
|
||||||
|
// ConfigurationShared::SetHighlight(ui->bg_layout, !Settings::values.bg_red.UsingGlobal());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::SetFSRIndicatorText(int percentage) {
|
void ConfigureGraphics::SetFSRIndicatorText(int percentage) {
|
||||||
ui->fsr_sharpening_value->setText(
|
// ui->fsr_sharpening_value->setText(
|
||||||
tr("%1%", "FSR sharpening percentage (e.g. 50%)").arg(100 - (percentage / 2)));
|
// tr("%1%", "FSR sharpening percentage (e.g. 50%)").arg(100 - (percentage / 2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString ConfigureGraphics::TranslateVSyncMode(VkPresentModeKHR mode,
|
const QString ConfigureGraphics::TranslateVSyncMode(VkPresentModeKHR mode,
|
||||||
|
@ -320,131 +366,134 @@ const QString ConfigureGraphics::TranslateVSyncMode(VkPresentModeKHR mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::ApplyConfiguration() {
|
void ConfigureGraphics::ApplyConfiguration() {
|
||||||
const auto resolution_setup = static_cast<Settings::ResolutionSetup>(
|
// const auto resolution_setup = static_cast<Settings::ResolutionSetup>(
|
||||||
ui->resolution_combobox->currentIndex() -
|
// ui->resolution_combobox->currentIndex() -
|
||||||
((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
// ((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
||||||
|
|
||||||
const auto scaling_filter = static_cast<Settings::ScalingFilter>(
|
// const auto scaling_filter = static_cast<Settings::ScalingFilter>(
|
||||||
ui->scaling_filter_combobox->currentIndex() -
|
// ui->scaling_filter_combobox->currentIndex() -
|
||||||
((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
// ((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
||||||
|
|
||||||
const auto anti_aliasing = static_cast<Settings::AntiAliasing>(
|
// const auto anti_aliasing = static_cast<Settings::AntiAliasing>(
|
||||||
ui->anti_aliasing_combobox->currentIndex() -
|
// ui->anti_aliasing_combobox->currentIndex() -
|
||||||
((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
// ((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
||||||
|
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.fullscreen_mode,
|
// ConfigurationShared::ApplyPerGameSetting(&Settings::values.fullscreen_mode,
|
||||||
ui->fullscreen_mode_combobox);
|
// ui->fullscreen_mode_combobox);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.aspect_ratio,
|
// ConfigurationShared::ApplyPerGameSetting(&Settings::values.aspect_ratio,
|
||||||
ui->aspect_ratio_combobox);
|
// ui->aspect_ratio_combobox);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_disk_shader_cache,
|
// ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_disk_shader_cache,
|
||||||
ui->use_disk_shader_cache, use_disk_shader_cache);
|
// ui->use_disk_shader_cache, use_disk_shader_cache);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_gpu_emulation,
|
// ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_gpu_emulation,
|
||||||
ui->use_asynchronous_gpu_emulation,
|
// ui->use_asynchronous_gpu_emulation,
|
||||||
use_asynchronous_gpu_emulation);
|
// use_asynchronous_gpu_emulation);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.accelerate_astc,
|
// ConfigurationShared::ApplyPerGameSetting(&Settings::values.accelerate_astc,
|
||||||
ui->astc_decode_mode_combobox);
|
// ui->astc_decode_mode_combobox);
|
||||||
|
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
// if (Settings::IsConfiguringGlobal()) {
|
||||||
// Guard if during game and set to game-specific value
|
// // Guard if during game and set to game-specific value
|
||||||
if (Settings::values.renderer_backend.UsingGlobal()) {
|
// if (Settings::values.renderer_backend.UsingGlobal()) {
|
||||||
Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
|
// Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
|
||||||
}
|
// }
|
||||||
if (Settings::values.nvdec_emulation.UsingGlobal()) {
|
// if (Settings::values.nvdec_emulation.UsingGlobal()) {
|
||||||
Settings::values.nvdec_emulation.SetValue(GetCurrentNvdecEmulation());
|
// Settings::values.nvdec_emulation.SetValue(GetCurrentNvdecEmulation());
|
||||||
}
|
// }
|
||||||
if (Settings::values.shader_backend.UsingGlobal()) {
|
// if (Settings::values.shader_backend.UsingGlobal()) {
|
||||||
Settings::values.shader_backend.SetValue(shader_backend);
|
// Settings::values.shader_backend.SetValue(shader_backend);
|
||||||
}
|
// }
|
||||||
if (Settings::values.vulkan_device.UsingGlobal()) {
|
// if (Settings::values.vulkan_device.UsingGlobal()) {
|
||||||
Settings::values.vulkan_device.SetValue(vulkan_device);
|
// Settings::values.vulkan_device.SetValue(vulkan_device);
|
||||||
}
|
// }
|
||||||
if (Settings::values.bg_red.UsingGlobal()) {
|
// if (Settings::values.bg_red.UsingGlobal()) {
|
||||||
Settings::values.bg_red.SetValue(static_cast<u8>(bg_color.red()));
|
// Settings::values.bg_red.SetValue(static_cast<u8>(bg_color.red()));
|
||||||
Settings::values.bg_green.SetValue(static_cast<u8>(bg_color.green()));
|
// Settings::values.bg_green.SetValue(static_cast<u8>(bg_color.green()));
|
||||||
Settings::values.bg_blue.SetValue(static_cast<u8>(bg_color.blue()));
|
// Settings::values.bg_blue.SetValue(static_cast<u8>(bg_color.blue()));
|
||||||
}
|
// }
|
||||||
if (Settings::values.resolution_setup.UsingGlobal()) {
|
// if (Settings::values.resolution_setup.UsingGlobal()) {
|
||||||
Settings::values.resolution_setup.SetValue(resolution_setup);
|
// Settings::values.resolution_setup.SetValue(resolution_setup);
|
||||||
}
|
// }
|
||||||
if (Settings::values.scaling_filter.UsingGlobal()) {
|
// if (Settings::values.scaling_filter.UsingGlobal()) {
|
||||||
Settings::values.scaling_filter.SetValue(scaling_filter);
|
// Settings::values.scaling_filter.SetValue(scaling_filter);
|
||||||
}
|
// }
|
||||||
if (Settings::values.anti_aliasing.UsingGlobal()) {
|
// if (Settings::values.anti_aliasing.UsingGlobal()) {
|
||||||
Settings::values.anti_aliasing.SetValue(anti_aliasing);
|
// Settings::values.anti_aliasing.SetValue(anti_aliasing);
|
||||||
}
|
// }
|
||||||
Settings::values.fsr_sharpening_slider.SetValue(ui->fsr_sharpening_slider->value());
|
// Settings::values.fsr_sharpening_slider.SetValue(ui->fsr_sharpening_slider->value());
|
||||||
|
|
||||||
const auto mode = vsync_mode_combobox_enum_map[ui->vsync_mode_combobox->currentIndex()];
|
// const auto mode = vsync_mode_combobox_enum_map[vsync_mode_combobox->currentIndex()];
|
||||||
const auto vsync_mode = PresentModeToSetting(mode);
|
// const auto vsync_mode = PresentModeToSetting(mode);
|
||||||
Settings::values.vsync_mode.SetValue(vsync_mode);
|
// Settings::values.vsync_mode.SetValue(vsync_mode);
|
||||||
} else {
|
// } else {
|
||||||
if (ui->resolution_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->resolution_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.resolution_setup.SetGlobal(true);
|
// Settings::values.resolution_setup.SetGlobal(true);
|
||||||
} else {
|
// } else {
|
||||||
Settings::values.resolution_setup.SetGlobal(false);
|
// Settings::values.resolution_setup.SetGlobal(false);
|
||||||
Settings::values.resolution_setup.SetValue(resolution_setup);
|
// Settings::values.resolution_setup.SetValue(resolution_setup);
|
||||||
}
|
// }
|
||||||
if (ui->scaling_filter_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->scaling_filter_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX)
|
||||||
Settings::values.scaling_filter.SetGlobal(true);
|
// {
|
||||||
} else {
|
// Settings::values.scaling_filter.SetGlobal(true);
|
||||||
Settings::values.scaling_filter.SetGlobal(false);
|
// } else {
|
||||||
Settings::values.scaling_filter.SetValue(scaling_filter);
|
// Settings::values.scaling_filter.SetGlobal(false);
|
||||||
}
|
// Settings::values.scaling_filter.SetValue(scaling_filter);
|
||||||
if (ui->anti_aliasing_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// }
|
||||||
Settings::values.anti_aliasing.SetGlobal(true);
|
// if (ui->anti_aliasing_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX)
|
||||||
} else {
|
// {
|
||||||
Settings::values.anti_aliasing.SetGlobal(false);
|
// Settings::values.anti_aliasing.SetGlobal(true);
|
||||||
Settings::values.anti_aliasing.SetValue(anti_aliasing);
|
// } else {
|
||||||
}
|
// Settings::values.anti_aliasing.SetGlobal(false);
|
||||||
if (ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// Settings::values.anti_aliasing.SetValue(anti_aliasing);
|
||||||
Settings::values.renderer_backend.SetGlobal(true);
|
// }
|
||||||
Settings::values.shader_backend.SetGlobal(true);
|
// if (api_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.vulkan_device.SetGlobal(true);
|
// Settings::values.renderer_backend.SetGlobal(true);
|
||||||
} else {
|
// Settings::values.shader_backend.SetGlobal(true);
|
||||||
Settings::values.renderer_backend.SetGlobal(false);
|
// Settings::values.vulkan_device.SetGlobal(true);
|
||||||
Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
|
// } else {
|
||||||
switch (GetCurrentGraphicsBackend()) {
|
// Settings::values.renderer_backend.SetGlobal(false);
|
||||||
case Settings::RendererBackend::OpenGL:
|
// Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
|
||||||
case Settings::RendererBackend::Null:
|
// switch (GetCurrentGraphicsBackend()) {
|
||||||
Settings::values.shader_backend.SetGlobal(false);
|
// case Settings::RendererBackend::OpenGL:
|
||||||
Settings::values.vulkan_device.SetGlobal(true);
|
// case Settings::RendererBackend::Null:
|
||||||
Settings::values.shader_backend.SetValue(shader_backend);
|
// Settings::values.shader_backend.SetGlobal(false);
|
||||||
break;
|
// Settings::values.vulkan_device.SetGlobal(true);
|
||||||
case Settings::RendererBackend::Vulkan:
|
// Settings::values.shader_backend.SetValue(shader_backend);
|
||||||
Settings::values.shader_backend.SetGlobal(true);
|
// break;
|
||||||
Settings::values.vulkan_device.SetGlobal(false);
|
// case Settings::RendererBackend::Vulkan:
|
||||||
Settings::values.vulkan_device.SetValue(vulkan_device);
|
// Settings::values.shader_backend.SetGlobal(true);
|
||||||
break;
|
// Settings::values.vulkan_device.SetGlobal(false);
|
||||||
}
|
// Settings::values.vulkan_device.SetValue(vulkan_device);
|
||||||
}
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (ui->nvdec_emulation->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->nvdec_emulation->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.nvdec_emulation.SetGlobal(true);
|
// Settings::values.nvdec_emulation.SetGlobal(true);
|
||||||
} else {
|
// } else {
|
||||||
Settings::values.nvdec_emulation.SetGlobal(false);
|
// Settings::values.nvdec_emulation.SetGlobal(false);
|
||||||
Settings::values.nvdec_emulation.SetValue(GetCurrentNvdecEmulation());
|
// Settings::values.nvdec_emulation.SetValue(GetCurrentNvdecEmulation());
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (ui->bg_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->bg_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.bg_red.SetGlobal(true);
|
// Settings::values.bg_red.SetGlobal(true);
|
||||||
Settings::values.bg_green.SetGlobal(true);
|
// Settings::values.bg_green.SetGlobal(true);
|
||||||
Settings::values.bg_blue.SetGlobal(true);
|
// Settings::values.bg_blue.SetGlobal(true);
|
||||||
} else {
|
// } else {
|
||||||
Settings::values.bg_red.SetGlobal(false);
|
// Settings::values.bg_red.SetGlobal(false);
|
||||||
Settings::values.bg_green.SetGlobal(false);
|
// Settings::values.bg_green.SetGlobal(false);
|
||||||
Settings::values.bg_blue.SetGlobal(false);
|
// Settings::values.bg_blue.SetGlobal(false);
|
||||||
Settings::values.bg_red.SetValue(static_cast<u8>(bg_color.red()));
|
// Settings::values.bg_red.SetValue(static_cast<u8>(bg_color.red()));
|
||||||
Settings::values.bg_green.SetValue(static_cast<u8>(bg_color.green()));
|
// Settings::values.bg_green.SetValue(static_cast<u8>(bg_color.green()));
|
||||||
Settings::values.bg_blue.SetValue(static_cast<u8>(bg_color.blue()));
|
// Settings::values.bg_blue.SetValue(static_cast<u8>(bg_color.blue()));
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (ui->fsr_sharpening_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->fsr_sharpening_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX)
|
||||||
Settings::values.fsr_sharpening_slider.SetGlobal(true);
|
// {
|
||||||
} else {
|
// Settings::values.fsr_sharpening_slider.SetGlobal(true);
|
||||||
Settings::values.fsr_sharpening_slider.SetGlobal(false);
|
// } else {
|
||||||
Settings::values.fsr_sharpening_slider.SetValue(ui->fsr_sharpening_slider->value());
|
// Settings::values.fsr_sharpening_slider.SetGlobal(false);
|
||||||
}
|
// Settings::values.fsr_sharpening_slider.SetValue(ui->fsr_sharpening_slider->value());
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::changeEvent(QEvent* event) {
|
void ConfigureGraphics::changeEvent(QEvent* event) {
|
||||||
|
@ -462,43 +511,43 @@ void ConfigureGraphics::RetranslateUI() {
|
||||||
void ConfigureGraphics::UpdateBackgroundColorButton(QColor color) {
|
void ConfigureGraphics::UpdateBackgroundColorButton(QColor color) {
|
||||||
bg_color = color;
|
bg_color = color;
|
||||||
|
|
||||||
QPixmap pixmap(ui->bg_button->size());
|
// QPixmap pixmap(ui->bg_button->size());
|
||||||
pixmap.fill(bg_color);
|
// pixmap.fill(bg_color);
|
||||||
|
|
||||||
const QIcon color_icon(pixmap);
|
// const QIcon color_icon(pixmap);
|
||||||
ui->bg_button->setIcon(color_icon);
|
// ui->bg_button->setIcon(color_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::UpdateAPILayout() {
|
void ConfigureGraphics::UpdateAPILayout() {
|
||||||
if (!Settings::IsConfiguringGlobal() &&
|
if (!Settings::IsConfiguringGlobal() &&
|
||||||
ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
api_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
vulkan_device = Settings::values.vulkan_device.GetValue(true);
|
vulkan_device = Settings::values.vulkan_device.GetValue(true);
|
||||||
shader_backend = Settings::values.shader_backend.GetValue(true);
|
shader_backend = Settings::values.shader_backend.GetValue(true);
|
||||||
ui->device_widget->setEnabled(false);
|
vulkan_device_widget->setEnabled(false);
|
||||||
ui->backend_widget->setEnabled(false);
|
shader_backend_widget->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||||
shader_backend = Settings::values.shader_backend.GetValue();
|
shader_backend = Settings::values.shader_backend.GetValue();
|
||||||
ui->device_widget->setEnabled(true);
|
vulkan_device_widget->setEnabled(true);
|
||||||
ui->backend_widget->setEnabled(true);
|
shader_backend_widget->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (GetCurrentGraphicsBackend()) {
|
switch (GetCurrentGraphicsBackend()) {
|
||||||
case Settings::RendererBackend::OpenGL:
|
case Settings::RendererBackend::OpenGL:
|
||||||
ui->backend->setCurrentIndex(static_cast<u32>(shader_backend));
|
shader_backend_combobox->setCurrentIndex(static_cast<u32>(shader_backend));
|
||||||
ui->device_widget->setVisible(false);
|
vulkan_device_widget->setVisible(false);
|
||||||
ui->backend_widget->setVisible(true);
|
shader_backend_widget->setVisible(true);
|
||||||
break;
|
break;
|
||||||
case Settings::RendererBackend::Vulkan:
|
case Settings::RendererBackend::Vulkan:
|
||||||
if (static_cast<int>(vulkan_device) < ui->device->count()) {
|
if (static_cast<int>(vulkan_device) < vulkan_device_combobox->count()) {
|
||||||
ui->device->setCurrentIndex(vulkan_device);
|
vulkan_device_combobox->setCurrentIndex(vulkan_device);
|
||||||
}
|
}
|
||||||
ui->device_widget->setVisible(true);
|
vulkan_device_widget->setVisible(true);
|
||||||
ui->backend_widget->setVisible(false);
|
shader_backend_widget->setVisible(false);
|
||||||
break;
|
break;
|
||||||
case Settings::RendererBackend::Null:
|
case Settings::RendererBackend::Null:
|
||||||
ui->device_widget->setVisible(false);
|
vulkan_device_widget->setVisible(false);
|
||||||
ui->backend_widget->setVisible(false);
|
shader_backend_widget->setVisible(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -520,92 +569,94 @@ void ConfigureGraphics::RetrieveVulkanDevices() {
|
||||||
|
|
||||||
Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const {
|
Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
if (Settings::IsConfiguringGlobal()) {
|
||||||
return static_cast<Settings::RendererBackend>(ui->api->currentIndex());
|
return static_cast<Settings::RendererBackend>(api_combobox->currentIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
if (api_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.renderer_backend.SetGlobal(true);
|
Settings::values.renderer_backend.SetGlobal(true);
|
||||||
return Settings::values.renderer_backend.GetValue();
|
return Settings::values.renderer_backend.GetValue();
|
||||||
}
|
}
|
||||||
Settings::values.renderer_backend.SetGlobal(false);
|
Settings::values.renderer_backend.SetGlobal(false);
|
||||||
return static_cast<Settings::RendererBackend>(ui->api->currentIndex() -
|
return static_cast<Settings::RendererBackend>(api_combobox->currentIndex() -
|
||||||
ConfigurationShared::USE_GLOBAL_OFFSET);
|
ConfigurationShared::USE_GLOBAL_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::NvdecEmulation ConfigureGraphics::GetCurrentNvdecEmulation() const {
|
Settings::NvdecEmulation ConfigureGraphics::GetCurrentNvdecEmulation() const {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
return Settings::NvdecEmulation::CPU;
|
||||||
return static_cast<Settings::NvdecEmulation>(ui->nvdec_emulation->currentIndex());
|
// if (Settings::IsConfiguringGlobal()) {
|
||||||
}
|
// return static_cast<Settings::NvdecEmulation>(ui->nvdec_emulation->currentIndex());
|
||||||
|
// }
|
||||||
|
|
||||||
if (ui->nvdec_emulation->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
// if (ui->nvdec_emulation->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||||
Settings::values.nvdec_emulation.SetGlobal(true);
|
// Settings::values.nvdec_emulation.SetGlobal(true);
|
||||||
return Settings::values.nvdec_emulation.GetValue();
|
// return Settings::values.nvdec_emulation.GetValue();
|
||||||
}
|
// }
|
||||||
Settings::values.nvdec_emulation.SetGlobal(false);
|
// Settings::values.nvdec_emulation.SetGlobal(false);
|
||||||
return static_cast<Settings::NvdecEmulation>(ui->nvdec_emulation->currentIndex() -
|
// return static_cast<Settings::NvdecEmulation>(ui->nvdec_emulation->currentIndex() -
|
||||||
ConfigurationShared::USE_GLOBAL_OFFSET);
|
// ConfigurationShared::USE_GLOBAL_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGraphics::SetupPerGameUI() {
|
void ConfigureGraphics::SetupPerGameUI() {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
// if (Settings::IsConfiguringGlobal()) {
|
||||||
ui->api->setEnabled(Settings::values.renderer_backend.UsingGlobal());
|
// api_combobox->setEnabled(Settings::values.renderer_backend.UsingGlobal());
|
||||||
ui->device->setEnabled(Settings::values.renderer_backend.UsingGlobal());
|
// vulkan_device_combobox->setEnabled(Settings::values.renderer_backend.UsingGlobal());
|
||||||
ui->fullscreen_mode_combobox->setEnabled(Settings::values.fullscreen_mode.UsingGlobal());
|
// ui->fullscreen_mode_combobox->setEnabled(Settings::values.fullscreen_mode.UsingGlobal());
|
||||||
ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal());
|
// ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal());
|
||||||
ui->resolution_combobox->setEnabled(Settings::values.resolution_setup.UsingGlobal());
|
// ui->resolution_combobox->setEnabled(Settings::values.resolution_setup.UsingGlobal());
|
||||||
ui->scaling_filter_combobox->setEnabled(Settings::values.scaling_filter.UsingGlobal());
|
// ui->scaling_filter_combobox->setEnabled(Settings::values.scaling_filter.UsingGlobal());
|
||||||
ui->fsr_sharpening_slider->setEnabled(Settings::values.fsr_sharpening_slider.UsingGlobal());
|
// ui->fsr_sharpening_slider->setEnabled(Settings::values.fsr_sharpening_slider.UsingGlobal());
|
||||||
ui->anti_aliasing_combobox->setEnabled(Settings::values.anti_aliasing.UsingGlobal());
|
// ui->anti_aliasing_combobox->setEnabled(Settings::values.anti_aliasing.UsingGlobal());
|
||||||
ui->use_asynchronous_gpu_emulation->setEnabled(
|
// ui->use_asynchronous_gpu_emulation->setEnabled(
|
||||||
Settings::values.use_asynchronous_gpu_emulation.UsingGlobal());
|
// Settings::values.use_asynchronous_gpu_emulation.UsingGlobal());
|
||||||
ui->nvdec_emulation->setEnabled(Settings::values.nvdec_emulation.UsingGlobal());
|
// ui->nvdec_emulation->setEnabled(Settings::values.nvdec_emulation.UsingGlobal());
|
||||||
ui->astc_decode_mode_combobox->setEnabled(Settings::values.accelerate_astc.UsingGlobal());
|
// ui->astc_decode_mode_combobox->setEnabled(Settings::values.accelerate_astc.UsingGlobal());
|
||||||
ui->use_disk_shader_cache->setEnabled(Settings::values.use_disk_shader_cache.UsingGlobal());
|
// ui->use_disk_shader_cache->setEnabled(Settings::values.use_disk_shader_cache.UsingGlobal());
|
||||||
ui->bg_button->setEnabled(Settings::values.bg_red.UsingGlobal());
|
// ui->bg_button->setEnabled(Settings::values.bg_red.UsingGlobal());
|
||||||
ui->fsr_slider_layout->setEnabled(Settings::values.fsr_sharpening_slider.UsingGlobal());
|
// ui->fsr_slider_layout->setEnabled(Settings::values.fsr_sharpening_slider.UsingGlobal());
|
||||||
|
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
connect(ui->bg_combobox, qOverload<int>(&QComboBox::activated), this, [this](int index) {
|
// connect(ui->bg_combobox, qOverload<int>(&QComboBox::activated), this, [this](int index) {
|
||||||
ui->bg_button->setEnabled(index == 1);
|
// ui->bg_button->setEnabled(index == 1);
|
||||||
ConfigurationShared::SetHighlight(ui->bg_layout, index == 1);
|
// ConfigurationShared::SetHighlight(ui->bg_layout, index == 1);
|
||||||
});
|
// });
|
||||||
|
|
||||||
connect(ui->fsr_sharpening_combobox, qOverload<int>(&QComboBox::activated), this,
|
// connect(ui->fsr_sharpening_combobox, qOverload<int>(&QComboBox::activated), this,
|
||||||
[this](int index) {
|
// [this](int index) {
|
||||||
ui->fsr_sharpening_slider->setEnabled(index == 1);
|
// ui->fsr_sharpening_slider->setEnabled(index == 1);
|
||||||
ui->fsr_sharpening_value->setEnabled(index == 1);
|
// ui->fsr_sharpening_value->setEnabled(index == 1);
|
||||||
ConfigurationShared::SetHighlight(ui->fsr_sharpening_layout, index == 1);
|
// ConfigurationShared::SetHighlight(ui->fsr_sharpening_layout, index == 1);
|
||||||
});
|
// });
|
||||||
|
|
||||||
ConfigurationShared::SetColoredTristate(
|
// ConfigurationShared::SetColoredTristate(
|
||||||
ui->use_disk_shader_cache, Settings::values.use_disk_shader_cache, use_disk_shader_cache);
|
// ui->use_disk_shader_cache, Settings::values.use_disk_shader_cache,
|
||||||
ConfigurationShared::SetColoredTristate(ui->use_asynchronous_gpu_emulation,
|
// use_disk_shader_cache);
|
||||||
Settings::values.use_asynchronous_gpu_emulation,
|
// ConfigurationShared::SetColoredTristate(ui->use_asynchronous_gpu_emulation,
|
||||||
use_asynchronous_gpu_emulation);
|
// Settings::values.use_asynchronous_gpu_emulation,
|
||||||
|
// use_asynchronous_gpu_emulation);
|
||||||
|
|
||||||
ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->ar_label,
|
// ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->ar_label,
|
||||||
Settings::values.aspect_ratio.GetValue(true));
|
// Settings::values.aspect_ratio.GetValue(true));
|
||||||
ConfigurationShared::SetColoredComboBox(
|
// ConfigurationShared::SetColoredComboBox(
|
||||||
ui->fullscreen_mode_combobox, ui->fullscreen_mode_label,
|
// ui->fullscreen_mode_combobox, ui->fullscreen_mode_label,
|
||||||
static_cast<int>(Settings::values.fullscreen_mode.GetValue(true)));
|
// static_cast<int>(Settings::values.fullscreen_mode.GetValue(true)));
|
||||||
ConfigurationShared::SetColoredComboBox(
|
// ConfigurationShared::SetColoredComboBox(
|
||||||
ui->resolution_combobox, ui->resolution_label,
|
// ui->resolution_combobox, ui->resolution_label,
|
||||||
static_cast<int>(Settings::values.resolution_setup.GetValue(true)));
|
// static_cast<int>(Settings::values.resolution_setup.GetValue(true)));
|
||||||
ConfigurationShared::SetColoredComboBox(
|
// ConfigurationShared::SetColoredComboBox(
|
||||||
ui->scaling_filter_combobox, ui->scaling_filter_label,
|
// ui->scaling_filter_combobox, ui->scaling_filter_label,
|
||||||
static_cast<int>(Settings::values.scaling_filter.GetValue(true)));
|
// static_cast<int>(Settings::values.scaling_filter.GetValue(true)));
|
||||||
ConfigurationShared::SetColoredComboBox(
|
// ConfigurationShared::SetColoredComboBox(
|
||||||
ui->anti_aliasing_combobox, ui->anti_aliasing_label,
|
// ui->anti_aliasing_combobox, ui->anti_aliasing_label,
|
||||||
static_cast<int>(Settings::values.anti_aliasing.GetValue(true)));
|
// static_cast<int>(Settings::values.anti_aliasing.GetValue(true)));
|
||||||
ConfigurationShared::SetColoredComboBox(
|
// ConfigurationShared::SetColoredComboBox(
|
||||||
ui->astc_decode_mode_combobox, ui->astc_decode_mode_label,
|
// ui->astc_decode_mode_combobox, ui->astc_decode_mode_label,
|
||||||
static_cast<int>(Settings::values.accelerate_astc.GetValue(true)));
|
// static_cast<int>(Settings::values.accelerate_astc.GetValue(true)));
|
||||||
ConfigurationShared::InsertGlobalItem(
|
// ConfigurationShared::InsertGlobalItem(
|
||||||
ui->api, static_cast<int>(Settings::values.renderer_backend.GetValue(true)));
|
// api_combobox, static_cast<int>(Settings::values.renderer_backend.GetValue(true)));
|
||||||
ConfigurationShared::InsertGlobalItem(
|
// ConfigurationShared::InsertGlobalItem(
|
||||||
ui->nvdec_emulation, static_cast<int>(Settings::values.nvdec_emulation.GetValue(true)));
|
// ui->nvdec_emulation, static_cast<int>(Settings::values.nvdec_emulation.GetValue(true)));
|
||||||
|
|
||||||
ui->vsync_mode_layout->setVisible(false);
|
// ui->vsync_mode_layout->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
class QEvent;
|
class QEvent;
|
||||||
class QObject;
|
class QObject;
|
||||||
|
class QComboBox;
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
enum class NvdecEmulation : u32;
|
enum class NvdecEmulation : u32;
|
||||||
|
@ -38,6 +39,7 @@ public:
|
||||||
std::vector<VkDeviceInfo::Record>& records,
|
std::vector<VkDeviceInfo::Record>& records,
|
||||||
const std::function<void()>& expose_compute_option_,
|
const std::function<void()>& expose_compute_option_,
|
||||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||||
|
const ConfigurationShared::TranslationMap& translations_,
|
||||||
QWidget* parent = nullptr);
|
QWidget* parent = nullptr);
|
||||||
~ConfigureGraphics() override;
|
~ConfigureGraphics() override;
|
||||||
|
|
||||||
|
@ -70,10 +72,8 @@ private:
|
||||||
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
||||||
QColor bg_color;
|
QColor bg_color;
|
||||||
|
|
||||||
ConfigurationShared::CheckState use_nvdec_emulation;
|
std::list<ConfigurationShared::CheckState> trackers{};
|
||||||
ConfigurationShared::CheckState accelerate_astc;
|
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||||
ConfigurationShared::CheckState use_disk_shader_cache;
|
|
||||||
ConfigurationShared::CheckState use_asynchronous_gpu_emulation;
|
|
||||||
|
|
||||||
std::vector<VkDeviceInfo::Record>& records;
|
std::vector<VkDeviceInfo::Record>& records;
|
||||||
std::vector<QString> vulkan_devices;
|
std::vector<QString> vulkan_devices;
|
||||||
|
@ -86,4 +86,12 @@ private:
|
||||||
const std::function<void()>& expose_compute_option;
|
const std::function<void()>& expose_compute_option;
|
||||||
|
|
||||||
const Core::System& system;
|
const Core::System& system;
|
||||||
|
const ConfigurationShared::TranslationMap& translations;
|
||||||
|
|
||||||
|
QComboBox* vulkan_device_combobox;
|
||||||
|
QComboBox* api_combobox;
|
||||||
|
QComboBox* shader_backend_combobox;
|
||||||
|
QComboBox* vsync_mode_combobox;
|
||||||
|
QWidget* vulkan_device_widget;
|
||||||
|
QWidget* shader_backend_widget;
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,112 +43,6 @@
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QWidget" name="backend_widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="backend_layout">
|
|
||||||
<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="QLabel" name="backend_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Shader Backend:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="backend"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QWidget" name="device_widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="device_layout">
|
|
||||||
<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="QLabel" name="device_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="device"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QWidget" name="api_layout_2" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="api_layout">
|
|
||||||
<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="QLabel" name="api_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>API:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="api">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">OpenGL</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Vulkan</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>None</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -168,649 +62,8 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="use_disk_shader_cache">
|
<widget class="QWidget" name="graphics_widget" native="true">
|
||||||
<property name="text">
|
<layout class="QVBoxLayout" name="verticalLayout"/>
|
||||||
<string>Use disk pipeline cache</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="use_asynchronous_gpu_emulation">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use asynchronous GPU emulation</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="vsync_mode_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<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="QLabel" name="vsync_mode_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>VSync Mode:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="vsync_mode_combobox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh rate.
|
|
||||||
FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down.
|
|
||||||
Mailbox can have lower latency than FIFO and does not tear but may drop frames.
|
|
||||||
Immediate (no synchronization) just presents whatever is available and can exhibit tearing.</string>
|
|
||||||
</property>
|
|
||||||
<property name="currentText">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="astc_decode_mode_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
|
||||||
<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="QLabel" name="astc_decode_mode_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>ASTC Texture Decoding Method:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="astc_decode_mode_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>CPU</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>GPU Compute</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>CPU Asynchronous (Hack)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="nvdec_emulation_widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="nvdec_emulation_layout">
|
|
||||||
<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="QLabel" name="nvdec_emulation_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>NVDEC emulation:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="nvdec_emulation">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>No Video Output</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>CPU Video Decoding</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>GPU Video Decoding (Default)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="fullscreen_mode_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
|
||||||
<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="QLabel" name="fullscreen_mode_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Fullscreen Mode:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="fullscreen_mode_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Borderless Windowed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Exclusive Fullscreen</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="aspect_ratio_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<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="QLabel" name="ar_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Aspect Ratio:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="aspect_ratio_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default (16:9)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Force 4:3</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Force 21:9</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Force 16:10</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Stretch to Window</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="resolution_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<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="QLabel" name="resolution_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Resolution:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="resolution_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>0.5X (360p/540p) [EXPERIMENTAL]</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>0.75X (540p/810p) [EXPERIMENTAL]</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>1X (720p/1080p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>1.5X (1080p/1620p) [EXPERIMENTAL]</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>2X (1440p/2160p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>3X (2160p/3240p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>4X (2880p/4320p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>5X (3600p/5400p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>6X (4320p/6480p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>7X (5040p/7560p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>8X (5760p/8640p)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="scaling_filter_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<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="QLabel" name="scaling_filter_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Window Adapting Filter:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="scaling_filter_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Nearest Neighbor</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Bilinear</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Bicubic</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Gaussian</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>ScaleForce</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>AMD FidelityFX™️ Super Resolution</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="anti_aliasing_layout" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<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="QLabel" name="anti_aliasing_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Anti-Aliasing Method:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="anti_aliasing_combobox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>None</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>FXAA</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>SMAA</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="fsr_sharpening_layout" native="true">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<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>
|
|
||||||
<layout class="QHBoxLayout" name="fsr_sharpening_label_group">
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="fsr_sharpening_combobox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Use global FSR Sharpness</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Set FSR Sharpness</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fsr_sharpening_label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>FSR Sharpness:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="fsr_slider_layout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QSlider" name="fsr_sharpening_slider">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>200</number>
|
|
||||||
</property>
|
|
||||||
<property name="sliderPosition">
|
|
||||||
<number>25</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="invertedAppearance">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fsr_sharpening_value">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>100%</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="bg_layout" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<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="QComboBox" name="bg_combobox">
|
|
||||||
<property name="currentText">
|
|
||||||
<string>Use global background color</string>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maxVisibleItems">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Use global background color</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Set background color:</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="bg_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Background Color:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="bg_button">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -32,8 +32,8 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||||
|
|
||||||
for (auto setting :
|
for (auto setting :
|
||||||
Settings::values.linkage.by_category[Settings::Category::RendererAdvanced]) {
|
Settings::values.linkage.by_category[Settings::Category::RendererAdvanced]) {
|
||||||
QWidget* widget = ConfigurationShared::CreateWidget(setting, translations, this,
|
auto [widget, extra] = ConfigurationShared::CreateWidget(
|
||||||
runtime_lock, apply_funcs, trackers);
|
setting, translations, this, runtime_lock, apply_funcs, trackers);
|
||||||
|
|
||||||
if (widget == nullptr) {
|
if (widget == nullptr) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -58,7 +58,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
||||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, *translations, this);
|
std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, *translations, this);
|
||||||
graphics_tab = std::make_unique<ConfigureGraphics>(
|
graphics_tab = std::make_unique<ConfigureGraphics>(
|
||||||
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
||||||
tab_group, this);
|
tab_group, *translations, this);
|
||||||
input_tab = std::make_unique<ConfigureInputPerGame>(system_, game_config.get(), this);
|
input_tab = std::make_unique<ConfigureInputPerGame>(system_, game_config.get(), this);
|
||||||
system_tab = std::make_unique<ConfigureSystem>(system_, tab_group, this);
|
system_tab = std::make_unique<ConfigureSystem>(system_, tab_group, this);
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
|
||||||
|
|
||||||
// Cpu
|
// Cpu
|
||||||
INSERT("cpu_accuracy", "Accuracy:", "");
|
INSERT("cpu_accuracy", "Accuracy:", "");
|
||||||
|
INSERT("cpu_accuracy_first_time", "", "");
|
||||||
|
|
||||||
// Cpu Debug
|
// Cpu Debug
|
||||||
INSERT("cpu_debug_mode", "Enable CPU Debugging", "");
|
INSERT("cpu_debug_mode", "Enable CPU Debugging", "");
|
||||||
|
@ -75,13 +76,16 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
|
||||||
INSERT("use_disk_shader_cache", "Use disk pipeline cache", "");
|
INSERT("use_disk_shader_cache", "Use disk pipeline cache", "");
|
||||||
INSERT("use_asynchronous_gpu_emulation", "Use asynchronous GPU emulation", "");
|
INSERT("use_asynchronous_gpu_emulation", "Use asynchronous GPU emulation", "");
|
||||||
INSERT("nvdec_emulation", "NVDEC emulation:", "");
|
INSERT("nvdec_emulation", "NVDEC emulation:", "");
|
||||||
INSERT("acclerate_astc", "ASTC Decoding Method:", "");
|
INSERT("accelerate_astc", "ASTC Decoding Method:", "");
|
||||||
INSERT(
|
INSERT(
|
||||||
"use_vsync", "VSync Mode:",
|
"use_vsync", "VSync Mode:",
|
||||||
"FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh "
|
"FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh "
|
||||||
"rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. "
|
"rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. "
|
||||||
"Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate "
|
"Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate "
|
||||||
"(no synchronization) just presents whatever is available and can exhibit tearing.");
|
"(no synchronization) just presents whatever is available and can exhibit tearing.");
|
||||||
|
INSERT("bg_red", "", "");
|
||||||
|
INSERT("bg_green", "", "");
|
||||||
|
INSERT("bg_blue", "", "");
|
||||||
|
|
||||||
// Renderer (Advanced Graphics)
|
// Renderer (Advanced Graphics)
|
||||||
INSERT("async_presentation", "Enable asynchronous presentation (Vulkan only)", "");
|
INSERT("async_presentation", "Enable asynchronous presentation (Vulkan only)", "");
|
||||||
|
@ -104,9 +108,6 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
|
||||||
"Enable compute pipelines, required by some games.\nThis setting only exists for Intel "
|
"Enable compute pipelines, required by some games.\nThis setting only exists for Intel "
|
||||||
"proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled "
|
"proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled "
|
||||||
"on all other drivers.");
|
"on all other drivers.");
|
||||||
INSERT("bg_red", "Background Color:", "");
|
|
||||||
INSERT("bg_green", "Background Color:", "");
|
|
||||||
INSERT("bg_blue", "Background Color:", "");
|
|
||||||
|
|
||||||
// Renderer (Debug)
|
// Renderer (Debug)
|
||||||
INSERT("debug", "Enable Graphics Debugging",
|
INSERT("debug", "Enable Graphics Debugging",
|
||||||
|
|
Reference in New Issue