diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 7da095a02..8c6a12103 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -46,7 +46,12 @@ add_executable(citra-qt
configuration/configure_camera.ui
configuration/configure_debug.cpp
configuration/configure_debug.h
+<<<<<<< HEAD
configuration/configure_debug.ui
+=======
+ configuration/configure_enhancements.cpp
+ configuration/configure_enhancements.h
+>>>>>>> 76ca777b... reorder graphics tab, move speed to general
configuration/configure_dialog.cpp
configuration/configure_dialog.h
configuration/configure_general.cpp
@@ -155,6 +160,38 @@ add_executable(citra-qt
util/spinbox.h
util/util.cpp
util/util.h
+<<<<<<< HEAD
+=======
+ compatdb.cpp
+ compatdb.h
+)
+
+set(UIS
+ configuration/configure.ui
+ configuration/configure_audio.ui
+ configuration/configure_camera.ui
+ configuration/configure_debug.ui
+ configuration/configure_enhancements.ui
+ configuration/configure_general.ui
+ configuration/configure_graphics.ui
+ configuration/configure_hotkeys.ui
+ configuration/configure_input.ui
+ configuration/configure_motion_touch.ui
+ configuration/configure_system.ui
+ configuration/configure_ui.ui
+ configuration/configure_web.ui
+ debugger/registers.ui
+ multiplayer/direct_connect.ui
+ multiplayer/lobby.ui
+ multiplayer/chat_room.ui
+ multiplayer/client_room.ui
+ multiplayer/host_room.ui
+ multiplayer/moderation_dialog.ui
+ aboutdialog.ui
+ cheats.ui
+ main.ui
+ compatdb.ui
+>>>>>>> 76ca777b... reorder graphics tab, move speed to general
)
file(GLOB COMPAT_LIST
diff --git a/src/citra_qt/configuration/configure.ui b/src/citra_qt/configuration/configure.ui
index 8b625d8c3..4c634f314 100644
--- a/src/citra_qt/configuration/configure.ui
+++ b/src/citra_qt/configuration/configure.ui
@@ -48,6 +48,11 @@
Graphics
+
+
+ Enhancements
+
+
Audio
@@ -134,6 +139,12 @@
QWidget
configuration/configure_graphics.h
1
+
+
+ ConfigureEnhancements
+ QWidget
+ configuration/configure_enhancements.h
+ 1
ConfigureWeb
diff --git a/src/citra_qt/configuration/configure_dialog.cpp b/src/citra_qt/configuration/configure_dialog.cpp
index e8815d760..8c742ca1e 100644
--- a/src/citra_qt/configuration/configure_dialog.cpp
+++ b/src/citra_qt/configuration/configure_dialog.cpp
@@ -45,6 +45,7 @@ void ConfigureDialog::SetConfiguration() {
ui->systemTab->SetConfiguration();
ui->inputTab->LoadConfiguration();
ui->graphicsTab->SetConfiguration();
+ ui->enhancementsTab->SetConfiguration();
ui->audioTab->SetConfiguration();
ui->cameraTab->SetConfiguration();
ui->debugTab->SetConfiguration();
@@ -59,6 +60,7 @@ void ConfigureDialog::ApplyConfiguration() {
ui->inputTab->ApplyProfile();
ui->hotkeysTab->ApplyConfiguration(registry);
ui->graphicsTab->ApplyConfiguration();
+ ui->enhancementsTab->ApplyConfiguration();
ui->audioTab->ApplyConfiguration();
ui->cameraTab->ApplyConfiguration();
ui->debugTab->ApplyConfiguration();
@@ -73,11 +75,20 @@ Q_DECLARE_METATYPE(QList);
void ConfigureDialog::PopulateSelectionList() {
ui->selectorList->clear();
+<<<<<<< HEAD
const std::array>, 4> items{
{{tr("General"), {ui->generalTab, ui->webTab, ui->debugTab, ui->uiTab}},
{tr("System"), {ui->systemTab, ui->audioTab, ui->cameraTab}},
{tr("Graphics"), {ui->graphicsTab}},
{tr("Controls"), {ui->inputTab, ui->hotkeysTab}}}};
+=======
+ const std::array, 4> items{
+ {{tr("General"),
+ {QT_TR_NOOP("General"), QT_TR_NOOP("Web"), QT_TR_NOOP("Debug"), QT_TR_NOOP("UI")}},
+ {tr("System"), {QT_TR_NOOP("System"), QT_TR_NOOP("Audio"), QT_TR_NOOP("Camera")}},
+ {tr("Graphics"), {QT_TR_NOOP("Enhancements"), QT_TR_NOOP("Advanced")}},
+ {tr("Controls"), {QT_TR_NOOP("Input"), QT_TR_NOOP("Hotkeys")}}}};
+>>>>>>> 76ca777b... reorder graphics tab, move speed to general
for (const auto& entry : items) {
auto* const item = new QListWidgetItem(entry.first);
@@ -109,6 +120,7 @@ void ConfigureDialog::RetranslateUI() {
ui->inputTab->RetranslateUI();
ui->hotkeysTab->RetranslateUI();
ui->graphicsTab->RetranslateUI();
+ ui->enhancementsTab->RetranslateUI();
ui->audioTab->RetranslateUI();
ui->cameraTab->RetranslateUI();
ui->debugTab->RetranslateUI();
diff --git a/src/citra_qt/configuration/configure_enhancements.cpp b/src/citra_qt/configuration/configure_enhancements.cpp
index 43df0e911..d8b00f5e0 100644
--- a/src/citra_qt/configuration/configure_enhancements.cpp
+++ b/src/citra_qt/configuration/configure_enhancements.cpp
@@ -1,14 +1,109 @@
-#include "configure_enhancements.h"
-#include "ui_configure_enhancements.h"
+// Copyright 2019 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
-ConfigureEnhancements::ConfigureEnhancements(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::ConfigureEnhancements)
-{
+#include
+#include "citra_qt/configuration/configure_enhancements.h"
+#include "core/settings.h"
+#include "ui_configure_enhancements.h"
+#include "video_core/renderer_opengl/post_processing_opengl.h"
+
+ConfigureEnhancements::ConfigureEnhancements(QWidget* parent)
+ : QWidget(parent), ui(new Ui::ConfigureEnhancements) {
ui->setupUi(this);
+ SetConfiguration();
+
+ ui->layoutBox->setEnabled(!Settings::values.custom_layout);
+
+ ui->resolution_factor_combobox->setEnabled(Settings::values.use_hw_renderer);
+
+ connect(ui->render_3d_combobox,
+ static_cast(&QComboBox::currentIndexChanged), this,
+ [this](int currentIndex) {
+ updateShaders(static_cast(currentIndex) ==
+ Settings::StereoRenderOption::Anaglyph);
+ });
+
+ connect(ui->bg_button, &QPushButton::clicked, this, [this] {
+ const QColor new_bg_color = QColorDialog::getColor(bg_color);
+ if (!new_bg_color.isValid()) {
+ return;
+ }
+ bg_color = new_bg_color;
+ QPixmap pixmap(ui->bg_button->size());
+ pixmap.fill(bg_color);
+ const QIcon color_icon(pixmap);
+ ui->bg_button->setIcon(color_icon);
+ });
+
+ ui->toggle_preload_textures->setEnabled(ui->toggle_custom_textures->isChecked());
+ connect(ui->toggle_custom_textures, &QCheckBox::toggled, this, [this] {
+ ui->toggle_preload_textures->setEnabled(ui->toggle_custom_textures->isChecked());
+ if (!ui->toggle_preload_textures->isEnabled())
+ ui->toggle_preload_textures->setChecked(false);
+ });
}
-ConfigureEnhancements::~ConfigureEnhancements()
-{
+void ConfigureEnhancements::SetConfiguration() {
+ ui->resolution_factor_combobox->setCurrentIndex(Settings::values.resolution_factor);
+ ui->render_3d_combobox->setCurrentIndex(static_cast(Settings::values.render_3d));
+ ui->factor_3d->setValue(Settings::values.factor_3d);
+ updateShaders(Settings::values.render_3d == Settings::StereoRenderOption::Anaglyph);
+ ui->toggle_linear_filter->setChecked(Settings::values.filter_mode);
+ ui->layout_combobox->setCurrentIndex(static_cast(Settings::values.layout_option));
+ ui->swap_screen->setChecked(Settings::values.swap_screen);
+ ui->toggle_dump_textures->setChecked(Settings::values.dump_textures);
+ ui->toggle_custom_textures->setChecked(Settings::values.custom_textures);
+ ui->toggle_preload_textures->setChecked(Settings::values.preload_textures);
+ bg_color = QColor::fromRgbF(Settings::values.bg_red, Settings::values.bg_green,
+ Settings::values.bg_blue);
+ QPixmap pixmap(ui->bg_button->size());
+ pixmap.fill(bg_color);
+ const QIcon color_icon(pixmap);
+ ui->bg_button->setIcon(color_icon);
+}
+
+void ConfigureEnhancements::updateShaders(bool anaglyph) {
+ ui->shader_combobox->clear();
+
+ if (anaglyph)
+ ui->shader_combobox->addItem("dubois (builtin)");
+ else
+ ui->shader_combobox->addItem("none (builtin)");
+
+ ui->shader_combobox->setCurrentIndex(0);
+
+ for (const auto& shader : OpenGL::GetPostProcessingShaderList(anaglyph)) {
+ ui->shader_combobox->addItem(QString::fromStdString(shader));
+ if (Settings::values.pp_shader_name == shader)
+ ui->shader_combobox->setCurrentIndex(ui->shader_combobox->count() - 1);
+ }
+}
+
+void ConfigureEnhancements::RetranslateUI() {
+ ui->retranslateUi(this);
+}
+
+void ConfigureEnhancements::ApplyConfiguration() {
+ Settings::values.resolution_factor =
+ static_cast(ui->resolution_factor_combobox->currentIndex());
+ Settings::values.render_3d =
+ static_cast(ui->render_3d_combobox->currentIndex());
+ Settings::values.factor_3d = ui->factor_3d->value();
+ Settings::values.pp_shader_name =
+ ui->shader_combobox->itemText(ui->shader_combobox->currentIndex()).toStdString();
+ Settings::values.filter_mode = ui->toggle_linear_filter->isChecked();
+ Settings::values.layout_option =
+ static_cast(ui->layout_combobox->currentIndex());
+ Settings::values.swap_screen = ui->swap_screen->isChecked();
+ Settings::values.dump_textures = ui->toggle_dump_textures->isChecked();
+ Settings::values.custom_textures = ui->toggle_custom_textures->isChecked();
+ Settings::values.preload_textures = ui->toggle_preload_textures->isChecked();
+ Settings::values.bg_red = static_cast(bg_color.redF());
+ Settings::values.bg_green = static_cast(bg_color.greenF());
+ Settings::values.bg_blue = static_cast(bg_color.blueF());
+}
+
+ConfigureEnhancements::~ConfigureEnhancements() {
delete ui;
}
diff --git a/src/citra_qt/configuration/configure_enhancements.h b/src/citra_qt/configuration/configure_enhancements.h
index 2a16c847d..422c1dc35 100644
--- a/src/citra_qt/configuration/configure_enhancements.h
+++ b/src/citra_qt/configuration/configure_enhancements.h
@@ -1,5 +1,8 @@
-#ifndef CONFIGURE_ENHANCEMENTS_H
-#define CONFIGURE_ENHANCEMENTS_H
+// Copyright 2019 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
#include
@@ -7,16 +10,20 @@ namespace Ui {
class ConfigureEnhancements;
}
-class ConfigureEnhancements : public QWidget
-{
+class ConfigureEnhancements : public QWidget {
Q_OBJECT
public:
- explicit ConfigureEnhancements(QWidget *parent = nullptr);
+ explicit ConfigureEnhancements(QWidget* parent = nullptr);
~ConfigureEnhancements();
-private:
- Ui::ConfigureEnhancements *ui;
-};
+ void ApplyConfiguration();
+ void RetranslateUI();
+ void SetConfiguration();
-#endif // CONFIGURE_ENHANCEMENTS_H
+private:
+ void updateShaders(bool anaglyph);
+
+ Ui::ConfigureEnhancements* ui;
+ QColor bg_color;
+};
diff --git a/src/citra_qt/configuration/configure_enhancements.ui b/src/citra_qt/configuration/configure_enhancements.ui
index 5680d76ab..bb677dabb 100644
--- a/src/citra_qt/configuration/configure_enhancements.ui
+++ b/src/citra_qt/configuration/configure_enhancements.ui
@@ -1,21 +1,317 @@
+
-
-
-
ConfigureEnhancements
-
+
0
0
400
- 300
+ 595
+
+
+ 0
+ 0
+
+
Form
+
+ -
+
+
+ Renderer
+
+
+
-
+
+
-
+
+
+ Internal Resolution
+
+
+
+ -
+
+
-
+
+ Auto (Window Size)
+
+
+ -
+
+ Native (400x240)
+
+
+ -
+
+ 2x Native (800x480)
+
+
+ -
+
+ 3x Native (1200x720)
+
+
+ -
+
+ 4x Native (1600x960)
+
+
+ -
+
+ 5x Native (2000x1200)
+
+
+ -
+
+ 6x Native (2400x1440)
+
+
+ -
+
+ 7x Native (2800x1680)
+
+
+ -
+
+ 8x Native (3200x1920)
+
+
+ -
+
+ 9x Native (3600x2160)
+
+
+ -
+
+ 10x Native (4000x2400)
+
+
+
+
+
+
+ -
+
+
+ Enable Linear Filtering
+
+
+
+ -
+
+
-
+
+
+ Post-Processing Shader
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+ Stereoscopy
+
+
+
-
+
+
-
+
+
+ Stereoscopic 3D Mode
+
+
+
+ -
+
+
-
+
+ Off
+
+
+ -
+
+ Side by Side
+
+
+ -
+
+ Anaglyph
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Depth
+
+
+
+ -
+
+
+ %
+
+
+ 0
+
+
+ 100
+
+
+ 0
+
+
+
+
+
+
+
+
+ -
+
+
+ Layout
+
+
+
-
+
+
-
+
+
+ Screen Layout:
+
+
+
+ -
+
+
-
+
+ Default
+
+
+ -
+
+ Single Screen
+
+
+ -
+
+ Large Screen
+
+
+ -
+
+ Side by Side
+
+
+
+
+
+
+ -
+
+
+ Swap Screens
+
+
+
+ -
+
+
-
+
+
+ Background Color:
+
+
+
+ -
+
+
+
+ 40
+ 16777215
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Utility
+
+
+
-
+
+
+ <html><head/><body><p>Replace textures with PNG files.</p><p>Textures are loaded from load/textures/[Title ID]/.</p></body></html>
+
+
+ Use Custom Textures
+
+
+
+ -
+
+
+ <html><head/><body><p>Dump textures to PNG files.</p><p>Textures are dumped to dump/textures/[Title ID]/.</p></body></html>
+
+
+ Dump Textures
+
+
+
+ -
+
+
+ <html><head/><body><p>Load all custom textures into memory on boot, instead of loading them when the game requires them.</p></body></html>
+
+
+ Preload Custom Textures
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 165
+
+
+
+
+
-
+
diff --git a/src/citra_qt/configuration/configure_general.cpp b/src/citra_qt/configuration/configure_general.cpp
index 47d559e3d..e4b6be073 100644
--- a/src/citra_qt/configuration/configure_general.cpp
+++ b/src/citra_qt/configuration/configure_general.cpp
@@ -25,6 +25,10 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
ConfigureGeneral::~ConfigureGeneral() = default;
void ConfigureGeneral::SetConfiguration() {
+ ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit);
+ ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked());
+ ui->frame_limit->setValue(Settings::values.frame_limit);
+
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background);
@@ -53,6 +57,9 @@ void ConfigureGeneral::ResetDefaults() {
}
void ConfigureGeneral::ApplyConfiguration() {
+ Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked();
+ Settings::values.frame_limit = ui->frame_limit->value();
+
UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked();
diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp
index d7bf3f705..d04c0d6fe 100644
--- a/src/citra_qt/configuration/configure_graphics.cpp
+++ b/src/citra_qt/configuration/configure_graphics.cpp
@@ -21,14 +21,6 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
connect(ui->toggle_hw_renderer, &QCheckBox::toggled, this, [this] {
auto checked = ui->toggle_hw_renderer->isChecked();
ui->hw_renderer_group->setEnabled(checked);
- ui->toggle_custom_textures->setEnabled(checked);
- ui->toggle_dump_textures->setEnabled(checked);
- ui->toggle_preload_textures->setEnabled(false);
- if (!checked) {
- ui->toggle_custom_textures->setChecked(false);
- ui->toggle_dump_textures->setChecked(false);
- ui->toggle_preload_textures->setChecked(false);
- }
});
ui->hw_shader_group->setEnabled(ui->toggle_hw_shader->isChecked());
diff --git a/src/citra_qt/configuration/configure_graphics.h b/src/citra_qt/configuration/configure_graphics.h
index e3e6c6a18..9ed932090 100644
--- a/src/citra_qt/configuration/configure_graphics.h
+++ b/src/citra_qt/configuration/configure_graphics.h
@@ -26,7 +26,4 @@ public:
std::unique_ptr ui;
QColor bg_color;
-
-private:
- void updateShaders(bool anaglyph);
};
diff --git a/src/citra_qt/configuration/configure_graphics.ui b/src/citra_qt/configuration/configure_graphics.ui
index 6dba59e1c..88b9a0caa 100644
--- a/src/citra_qt/configuration/configure_graphics.ui
+++ b/src/citra_qt/configuration/configure_graphics.ui
@@ -7,9 +7,15 @@
0
0
400
- 603
+ 430
+
+
+ 0
+ 0
+
+
Form
@@ -45,76 +51,6 @@
0
- -
-
-
-
-
-
- Internal Resolution
-
-
-
- -
-
-
-
-
- Auto (Window Size)
-
-
- -
-
- Native (400x240)
-
-
- -
-
- 2x Native (800x480)
-
-
- -
-
- 3x Native (1200x720)
-
-
- -
-
- 4x Native (1600x960)
-
-
- -
-
- 5x Native (2000x1200)
-
-
- -
-
- 6x Native (2400x1440)
-
-
- -
-
- 7x Native (2800x1680)
-
-
- -
-
- 8x Native (3200x1920)
-
-
- -
-
- 9x Native (3600x2160)
-
-
- -
-
- 10x Native (4000x2400)
-
-
-
-
-
-
-
@@ -166,206 +102,21 @@
- -
-
-
- Enable Linear Filtering
-
-
-
- -
-
-
-
-
-
- Post-Processing Shader
-
-
-
- -
-
-
-
-
-
-
-
- Stereoscopy
+
+
+ Qt::Vertical
-
-
-
-
-
-
-
-
- Stereoscopic 3D Mode
-
-
-
- -
-
-
-
-
- Off
-
-
- -
-
- Side by Side
-
-
- -
-
- Anaglyph
-
-
-
-
-
-
- -
-
-
-
-
-
- Depth
-
-
-
- -
-
-
- %
-
-
- 0
-
-
- 100
-
-
- 0
-
-
-
-
-
-
-
-
- -
-
-
- Layout
+
+
+ 20
+ 270
+
-
-
-
-
-
-
-
-
- Screen Layout:
-
-
-
- -
-
-
-
-
- Default
-
-
- -
-
- Single Screen
-
-
- -
-
- Large Screen
-
-
- -
-
- Side by Side
-
-
-
-
-
-
- -
-
-
- Swap Screens
-
-
-
- -
-
-
-
-
-
- Background Color:
-
-
-
- -
-
-
-
- 40
- 16777215
-
-
-
-
-
-
-
-
-
- -
-
-
- Utility
-
-
-
-
-
-
- <html><head/><body><p>Replace textures with PNG files.</p><p>Textures are loaded from load/textures/[Title ID]/.</p></body></html>
-
-
- Use Custom Textures
-
-
-
- -
-
-
- <html><head/><body><p>Dump textures to PNG files.</p><p>Textures are dumped to dump/textures/[Title ID]/.</p></body></html>
-
-
- Dump Textures
-
-
-
- -
-
-
- <html><head/><body><p>Load all custom textures into memory on boot, instead of loading them when the game requires them.</p></body></html>
-
-
- Preload Custom Textures
-
-
-
-
-
+