2017-06-27 16:00:41 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-27 16:00:41 +00:00
|
|
|
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Config/Graphics/HacksWidget.h"
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QLabel>
|
2018-08-23 11:11:52 +00:00
|
|
|
#include <QSignalBlocker>
|
2017-06-27 16:00:41 +00:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include "Core/Config/GraphicsSettings.h"
|
2020-05-03 23:21:51 +00:00
|
|
|
#include "Core/Config/MainSettings.h"
|
2017-06-27 16:00:41 +00:00
|
|
|
#include "Core/ConfigManager.h"
|
2018-05-17 20:36:34 +00:00
|
|
|
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Config/Graphics/GraphicsBool.h"
|
|
|
|
#include "DolphinQt/Config/Graphics/GraphicsSlider.h"
|
|
|
|
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
2020-10-21 01:02:43 +00:00
|
|
|
#include "DolphinQt/Config/ToolTipControls/ToolTipSlider.h"
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Settings.h"
|
2018-05-17 20:36:34 +00:00
|
|
|
|
2017-06-27 16:00:41 +00:00
|
|
|
#include "VideoCommon/VideoConfig.h"
|
|
|
|
|
2020-10-21 01:02:43 +00:00
|
|
|
HacksWidget::HacksWidget(GraphicsWindow* parent)
|
2017-06-27 16:00:41 +00:00
|
|
|
{
|
|
|
|
CreateWidgets();
|
|
|
|
LoadSettings();
|
|
|
|
ConnectWidgets();
|
|
|
|
AddDescriptions();
|
2018-04-22 14:18:24 +00:00
|
|
|
|
|
|
|
connect(parent, &GraphicsWindow::BackendChanged, this, &HacksWidget::OnBackendChanged);
|
2020-05-03 23:21:51 +00:00
|
|
|
OnBackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
2018-05-17 20:36:34 +00:00
|
|
|
connect(&Settings::Instance(), &Settings::ConfigChanged, this, &HacksWidget::LoadSettings);
|
2017-06-27 16:00:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HacksWidget::CreateWidgets()
|
|
|
|
{
|
|
|
|
auto* main_layout = new QVBoxLayout;
|
|
|
|
|
|
|
|
// EFB
|
|
|
|
auto* efb_box = new QGroupBox(tr("Embedded Frame Buffer (EFB)"));
|
|
|
|
auto* efb_layout = new QGridLayout();
|
|
|
|
efb_box->setLayout(efb_layout);
|
|
|
|
m_skip_efb_cpu =
|
|
|
|
new GraphicsBool(tr("Skip EFB Access from CPU"), Config::GFX_HACK_EFB_ACCESS_ENABLE, true);
|
|
|
|
m_ignore_format_changes = new GraphicsBool(tr("Ignore Format Changes"),
|
|
|
|
Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES, true);
|
|
|
|
m_store_efb_copies = new GraphicsBool(tr("Store EFB Copies to Texture Only"),
|
|
|
|
Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);
|
2018-11-02 14:17:00 +00:00
|
|
|
m_defer_efb_copies =
|
|
|
|
new GraphicsBool(tr("Defer EFB Copies to RAM"), Config::GFX_HACK_DEFER_EFB_COPIES);
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
efb_layout->addWidget(m_skip_efb_cpu, 0, 0);
|
|
|
|
efb_layout->addWidget(m_ignore_format_changes, 0, 1);
|
|
|
|
efb_layout->addWidget(m_store_efb_copies, 1, 0);
|
2018-11-02 14:17:00 +00:00
|
|
|
efb_layout->addWidget(m_defer_efb_copies, 1, 1);
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
// Texture Cache
|
|
|
|
auto* texture_cache_box = new QGroupBox(tr("Texture Cache"));
|
|
|
|
auto* texture_cache_layout = new QGridLayout();
|
|
|
|
texture_cache_box->setLayout(texture_cache_layout);
|
|
|
|
|
2020-10-21 01:02:43 +00:00
|
|
|
m_accuracy = new ToolTipSlider(Qt::Horizontal);
|
2017-06-27 16:00:41 +00:00
|
|
|
m_accuracy->setMinimum(0);
|
|
|
|
m_accuracy->setMaximum(2);
|
2018-05-02 14:36:15 +00:00
|
|
|
m_accuracy->setPageStep(1);
|
|
|
|
m_accuracy->setTickPosition(QSlider::TicksBelow);
|
2017-06-27 16:00:41 +00:00
|
|
|
m_gpu_texture_decoding =
|
|
|
|
new GraphicsBool(tr("GPU Texture Decoding"), Config::GFX_ENABLE_GPU_TEXTURE_DECODING);
|
|
|
|
|
|
|
|
auto* safe_label = new QLabel(tr("Safe"));
|
|
|
|
safe_label->setAlignment(Qt::AlignRight);
|
|
|
|
|
2018-05-17 20:36:34 +00:00
|
|
|
m_accuracy_label = new QLabel(tr("Accuracy:"));
|
|
|
|
|
|
|
|
texture_cache_layout->addWidget(m_accuracy_label, 0, 0);
|
2017-06-27 16:00:41 +00:00
|
|
|
texture_cache_layout->addWidget(safe_label, 0, 1);
|
|
|
|
texture_cache_layout->addWidget(m_accuracy, 0, 2);
|
|
|
|
texture_cache_layout->addWidget(new QLabel(tr("Fast")), 0, 3);
|
|
|
|
texture_cache_layout->addWidget(m_gpu_texture_decoding, 1, 0);
|
|
|
|
|
|
|
|
// XFB
|
|
|
|
auto* xfb_box = new QGroupBox(tr("External Frame Buffer (XFB)"));
|
2017-11-19 23:35:22 +00:00
|
|
|
auto* xfb_layout = new QVBoxLayout();
|
2017-06-27 16:00:41 +00:00
|
|
|
xfb_box->setLayout(xfb_layout);
|
|
|
|
|
2017-06-26 03:23:47 +00:00
|
|
|
m_store_xfb_copies = new GraphicsBool(tr("Store XFB Copies to Texture Only"),
|
|
|
|
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
|
2017-09-03 02:30:34 +00:00
|
|
|
m_immediate_xfb = new GraphicsBool(tr("Immediately Present XFB"), Config::GFX_HACK_IMMEDIATE_XFB);
|
2020-01-14 00:57:35 +00:00
|
|
|
m_skip_duplicate_xfbs = new GraphicsBool(tr("Skip Presenting Duplicate Frames"),
|
|
|
|
Config::GFX_HACK_SKIP_DUPLICATE_XFBS);
|
2017-06-26 03:23:47 +00:00
|
|
|
|
2017-11-19 23:35:22 +00:00
|
|
|
xfb_layout->addWidget(m_store_xfb_copies);
|
|
|
|
xfb_layout->addWidget(m_immediate_xfb);
|
2020-01-14 00:57:35 +00:00
|
|
|
xfb_layout->addWidget(m_skip_duplicate_xfbs);
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
// Other
|
|
|
|
auto* other_box = new QGroupBox(tr("Other"));
|
|
|
|
auto* other_layout = new QGridLayout();
|
|
|
|
other_box->setLayout(other_layout);
|
|
|
|
|
|
|
|
m_fast_depth_calculation =
|
|
|
|
new GraphicsBool(tr("Fast Depth Calculation"), Config::GFX_FAST_DEPTH_CALC);
|
|
|
|
m_disable_bounding_box =
|
|
|
|
new GraphicsBool(tr("Disable Bounding Box"), Config::GFX_HACK_BBOX_ENABLE, true);
|
2022-01-26 23:48:12 +00:00
|
|
|
m_vertex_rounding = new GraphicsBool(tr("Vertex Rounding"), Config::GFX_HACK_VERTEX_ROUNDING);
|
2019-07-23 19:19:13 +00:00
|
|
|
m_save_texture_cache_state =
|
|
|
|
new GraphicsBool(tr("Save Texture Cache to State"), Config::GFX_SAVE_TEXTURE_CACHE_TO_STATE);
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
other_layout->addWidget(m_fast_depth_calculation, 0, 0);
|
|
|
|
other_layout->addWidget(m_disable_bounding_box, 0, 1);
|
|
|
|
other_layout->addWidget(m_vertex_rounding, 1, 0);
|
2019-07-23 19:19:13 +00:00
|
|
|
other_layout->addWidget(m_save_texture_cache_state, 1, 1);
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
main_layout->addWidget(efb_box);
|
|
|
|
main_layout->addWidget(texture_cache_box);
|
|
|
|
main_layout->addWidget(xfb_box);
|
|
|
|
main_layout->addWidget(other_box);
|
2017-09-14 16:48:20 +00:00
|
|
|
main_layout->addStretch();
|
2017-06-27 16:00:41 +00:00
|
|
|
|
|
|
|
setLayout(main_layout);
|
2018-11-02 14:17:00 +00:00
|
|
|
|
|
|
|
UpdateDeferEFBCopiesEnabled();
|
2020-01-14 00:57:35 +00:00
|
|
|
UpdateSkipPresentingDuplicateFramesEnabled();
|
2017-06-27 16:00:41 +00:00
|
|
|
}
|
|
|
|
|
2018-04-22 14:18:24 +00:00
|
|
|
void HacksWidget::OnBackendChanged(const QString& backend_name)
|
|
|
|
{
|
|
|
|
const bool bbox = g_Config.backend_info.bSupportsBBox;
|
|
|
|
const bool gpu_texture_decoding = g_Config.backend_info.bSupportsGPUTextureDecoding;
|
|
|
|
|
|
|
|
m_gpu_texture_decoding->setEnabled(gpu_texture_decoding);
|
|
|
|
m_disable_bounding_box->setEnabled(bbox);
|
|
|
|
|
2019-03-29 12:38:17 +00:00
|
|
|
const QString tooltip = tr("%1 doesn't support this feature on your system.").arg(backend_name);
|
2018-04-22 14:18:24 +00:00
|
|
|
|
2019-07-30 11:57:06 +00:00
|
|
|
m_gpu_texture_decoding->setToolTip(!gpu_texture_decoding ? tooltip : QString{});
|
|
|
|
m_disable_bounding_box->setToolTip(!bbox ? tooltip : QString{});
|
2018-04-22 14:18:24 +00:00
|
|
|
}
|
|
|
|
|
2017-06-27 16:00:41 +00:00
|
|
|
void HacksWidget::ConnectWidgets()
|
|
|
|
{
|
|
|
|
connect(m_accuracy, &QSlider::valueChanged, [this](int) { SaveSettings(); });
|
2018-11-02 14:17:00 +00:00
|
|
|
connect(m_store_efb_copies, &QCheckBox::stateChanged,
|
|
|
|
[this](int) { UpdateDeferEFBCopiesEnabled(); });
|
|
|
|
connect(m_store_xfb_copies, &QCheckBox::stateChanged,
|
|
|
|
[this](int) { UpdateDeferEFBCopiesEnabled(); });
|
2020-01-14 00:57:35 +00:00
|
|
|
connect(m_immediate_xfb, &QCheckBox::stateChanged,
|
|
|
|
[this](int) { UpdateSkipPresentingDuplicateFramesEnabled(); });
|
2017-06-27 16:00:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HacksWidget::LoadSettings()
|
|
|
|
{
|
2018-08-23 11:11:52 +00:00
|
|
|
const QSignalBlocker blocker(m_accuracy);
|
2017-06-27 16:00:41 +00:00
|
|
|
auto samples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
|
|
|
|
|
2022-02-23 15:59:21 +00:00
|
|
|
// Re-enable the slider in case it was disabled because of a custom value
|
|
|
|
m_accuracy->setEnabled(true);
|
|
|
|
|
2017-06-27 16:00:41 +00:00
|
|
|
int slider_pos = 0;
|
|
|
|
|
|
|
|
switch (samples)
|
|
|
|
{
|
|
|
|
case 512:
|
|
|
|
slider_pos = 1;
|
|
|
|
break;
|
|
|
|
case 128:
|
|
|
|
slider_pos = 2;
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
slider_pos = 0;
|
|
|
|
break;
|
|
|
|
// Custom values, ought not to be touched
|
|
|
|
default:
|
|
|
|
m_accuracy->setEnabled(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_accuracy->setValue(slider_pos);
|
2018-05-17 20:36:34 +00:00
|
|
|
|
|
|
|
QFont bf = m_accuracy_label->font();
|
|
|
|
|
|
|
|
bf.setBold(Config::GetActiveLayerForConfig(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES) !=
|
|
|
|
Config::LayerType::Base);
|
|
|
|
|
|
|
|
m_accuracy_label->setFont(bf);
|
2017-06-27 16:00:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HacksWidget::SaveSettings()
|
|
|
|
{
|
|
|
|
int slider_pos = m_accuracy->value();
|
|
|
|
|
|
|
|
if (m_accuracy->isEnabled())
|
|
|
|
{
|
|
|
|
int samples = 0;
|
|
|
|
switch (slider_pos)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
samples = 0;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
samples = 512;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
samples = 128;
|
|
|
|
}
|
|
|
|
|
|
|
|
Config::SetBaseOrCurrent(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES, samples);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void HacksWidget::AddDescriptions()
|
|
|
|
{
|
2020-10-21 01:02:43 +00:00
|
|
|
static const char TR_SKIP_EFB_CPU_ACCESS_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Ignores any requests from the CPU to read from or write to the EFB. "
|
|
|
|
"<br><br>Improves performance in some games, but will disable all EFB-based "
|
|
|
|
"graphical effects or gameplay-related features.<br><br><dolphin_emphasis>If unsure, "
|
|
|
|
"leave this unchecked.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_IGNORE_FORMAT_CHANGE_DESCRIPTION[] = QT_TR_NOOP(
|
2020-10-21 01:02:43 +00:00
|
|
|
"Ignores any changes to the EFB format.<br><br>Improves performance in many games "
|
|
|
|
"without "
|
2017-06-27 16:00:41 +00:00
|
|
|
"any negative effect. Causes graphical defects in a small number of other "
|
2020-10-21 01:02:43 +00:00
|
|
|
"games.<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_STORE_EFB_TO_TEXTURE_DESCRIPTION[] = QT_TR_NOOP(
|
2019-01-27 21:59:39 +00:00
|
|
|
"Stores EFB copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
2020-10-21 01:02:43 +00:00
|
|
|
"in a small number of games.<br><br>Enabled = EFB Copies to Texture<br>Disabled = EFB "
|
|
|
|
"Copies to "
|
|
|
|
"RAM (and Texture)<br><br><dolphin_emphasis>If unsure, leave this "
|
|
|
|
"checked.</dolphin_emphasis>");
|
2018-11-02 14:17:00 +00:00
|
|
|
static const char TR_DEFER_EFB_COPIES_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Waits until the game synchronizes with the emulated GPU before writing the contents of EFB "
|
2020-10-21 01:02:43 +00:00
|
|
|
"copies to RAM.<br><br>Reduces the overhead of EFB RAM copies, providing a performance "
|
|
|
|
"boost in "
|
2019-01-27 21:59:39 +00:00
|
|
|
"many games, at the risk of breaking those which do not safely synchronize with the "
|
2020-10-21 01:02:43 +00:00
|
|
|
"emulated GPU.<br><br><dolphin_emphasis>If unsure, leave this "
|
|
|
|
"checked.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_ACCUARCY_DESCRIPTION[] = QT_TR_NOOP(
|
2020-10-21 01:02:43 +00:00
|
|
|
"Adjusts the accuracy at which the GPU receives texture updates from RAM.<br><br>"
|
2017-06-27 16:00:41 +00:00
|
|
|
"The \"Safe\" setting eliminates the likelihood of the GPU missing texture updates "
|
2019-01-27 21:59:39 +00:00
|
|
|
"from RAM. Lower accuracies cause in-game text to appear garbled in certain "
|
2020-10-21 01:02:43 +00:00
|
|
|
"games.<br><br><dolphin_emphasis>If unsure, select the rightmost "
|
|
|
|
"value.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_STORE_XFB_TO_TEXTURE_DESCRIPTION[] = QT_TR_NOOP(
|
2019-01-27 21:59:39 +00:00
|
|
|
"Stores XFB copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
2020-10-21 01:02:43 +00:00
|
|
|
"in a small number of games.<br><br>Enabled = XFB Copies to "
|
|
|
|
"Texture<br>Disabled = XFB Copies to RAM (and Texture)<br><br><dolphin_emphasis>If "
|
|
|
|
"unsure, leave this checked.</dolphin_emphasis>");
|
|
|
|
static const char TR_IMMEDIATE_XFB_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Displays XFB copies as soon as they are created, instead of waiting for "
|
|
|
|
"scanout.<br><br>Can cause graphical defects in some games if the game doesn't "
|
|
|
|
"expect all XFB copies to be displayed. However, turning this setting on reduces "
|
|
|
|
"latency.<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
2020-01-14 00:57:35 +00:00
|
|
|
static const char TR_SKIP_DUPLICATE_XFBS_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Skips presentation of duplicate frames (XFB copies) in 25fps/30fps games. This may improve "
|
2020-10-21 01:02:43 +00:00
|
|
|
"performance on low-end devices, while making frame pacing less consistent.<br><br "
|
|
|
|
"/>Disable this "
|
|
|
|
"option as well as enabling V-Sync for optimal frame pacing.<br><br><dolphin_emphasis>If "
|
|
|
|
"unsure, leave this "
|
|
|
|
"checked.</dolphin_emphasis>");
|
|
|
|
static const char TR_GPU_DECODING_DESCRIPTION[] = QT_TR_NOOP(
|
|
|
|
"Enables texture decoding using the GPU instead of the CPU.<br><br>This may result in "
|
|
|
|
"performance gains in some scenarios, or on systems where the CPU is the "
|
|
|
|
"bottleneck.<br><br><dolphin_emphasis>If unsure, leave this "
|
|
|
|
"unchecked.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_FAST_DEPTH_CALC_DESCRIPTION[] = QT_TR_NOOP(
|
2020-10-21 01:02:43 +00:00
|
|
|
"Uses a less accurate algorithm to calculate depth values.<br><br>Causes issues in a few "
|
2019-01-27 21:59:39 +00:00
|
|
|
"games, but can result in a decent speed increase depending on the game and/or "
|
2020-10-21 01:02:43 +00:00
|
|
|
"GPU.<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
2018-06-06 13:05:18 +00:00
|
|
|
static const char TR_DISABLE_BOUNDINGBOX_DESCRIPTION[] =
|
2020-10-21 01:02:43 +00:00
|
|
|
QT_TR_NOOP("Disables bounding box emulation.<br><br>This may improve GPU performance "
|
|
|
|
"significantly, but some games will break.<br><br><dolphin_emphasis>If "
|
|
|
|
"unsure, leave this checked.</dolphin_emphasis>");
|
|
|
|
static const char TR_SAVE_TEXTURE_CACHE_TO_STATE_DESCRIPTION[] =
|
|
|
|
QT_TR_NOOP("Includes the contents of the embedded frame buffer (EFB) and upscaled EFB copies "
|
|
|
|
"in save states. Fixes missing and/or non-upscaled textures/objects when loading "
|
|
|
|
"states at the cost of additional save/load time.<br><br><dolphin_emphasis>If "
|
|
|
|
"unsure, leave this checked.</dolphin_emphasis>");
|
|
|
|
static const char TR_VERTEX_ROUNDING_DESCRIPTION[] = QT_TR_NOOP(
|
2022-01-26 20:09:00 +00:00
|
|
|
"Rounds 2D vertices to whole pixels and rounds the viewport size to a whole number.<br><br>"
|
|
|
|
"Fixes graphical problems in some games at higher internal resolutions. This setting has no "
|
|
|
|
"effect when native internal resolution is used.<br><br>"
|
|
|
|
"<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
2020-10-21 01:02:43 +00:00
|
|
|
|
2020-11-30 13:04:08 +00:00
|
|
|
m_skip_efb_cpu->SetDescription(tr(TR_SKIP_EFB_CPU_ACCESS_DESCRIPTION));
|
|
|
|
m_ignore_format_changes->SetDescription(tr(TR_IGNORE_FORMAT_CHANGE_DESCRIPTION));
|
|
|
|
m_store_efb_copies->SetDescription(tr(TR_STORE_EFB_TO_TEXTURE_DESCRIPTION));
|
|
|
|
m_defer_efb_copies->SetDescription(tr(TR_DEFER_EFB_COPIES_DESCRIPTION));
|
2020-10-21 01:02:43 +00:00
|
|
|
m_accuracy->SetTitle(tr("Texture Cache Accuracy"));
|
2020-11-30 13:04:08 +00:00
|
|
|
m_accuracy->SetDescription(tr(TR_ACCUARCY_DESCRIPTION));
|
|
|
|
m_store_xfb_copies->SetDescription(tr(TR_STORE_XFB_TO_TEXTURE_DESCRIPTION));
|
|
|
|
m_immediate_xfb->SetDescription(tr(TR_IMMEDIATE_XFB_DESCRIPTION));
|
|
|
|
m_skip_duplicate_xfbs->SetDescription(tr(TR_SKIP_DUPLICATE_XFBS_DESCRIPTION));
|
|
|
|
m_gpu_texture_decoding->SetDescription(tr(TR_GPU_DECODING_DESCRIPTION));
|
|
|
|
m_fast_depth_calculation->SetDescription(tr(TR_FAST_DEPTH_CALC_DESCRIPTION));
|
|
|
|
m_disable_bounding_box->SetDescription(tr(TR_DISABLE_BOUNDINGBOX_DESCRIPTION));
|
|
|
|
m_save_texture_cache_state->SetDescription(tr(TR_SAVE_TEXTURE_CACHE_TO_STATE_DESCRIPTION));
|
|
|
|
m_vertex_rounding->SetDescription(tr(TR_VERTEX_ROUNDING_DESCRIPTION));
|
2017-06-27 16:00:41 +00:00
|
|
|
}
|
2018-11-02 14:17:00 +00:00
|
|
|
|
|
|
|
void HacksWidget::UpdateDeferEFBCopiesEnabled()
|
|
|
|
{
|
|
|
|
// We disable the checkbox for defer EFB copies when both EFB and XFB copies to texture are
|
|
|
|
// enabled.
|
|
|
|
const bool can_defer = m_store_efb_copies->isChecked() && m_store_xfb_copies->isChecked();
|
|
|
|
m_defer_efb_copies->setEnabled(!can_defer);
|
|
|
|
}
|
2020-01-14 00:57:35 +00:00
|
|
|
|
|
|
|
void HacksWidget::UpdateSkipPresentingDuplicateFramesEnabled()
|
|
|
|
{
|
|
|
|
// If Immediate XFB is on, there's no point to skipping duplicate XFB copies as immediate presents
|
|
|
|
// when the XFB is created, therefore all XFB copies will be unique.
|
|
|
|
m_skip_duplicate_xfbs->setEnabled(!m_immediate_xfb->isChecked());
|
|
|
|
}
|