From 2267f98941ca03e11fbc0ff71ee4b682f8e41933 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 24 Aug 2016 22:15:38 -0400 Subject: qt: Add a configuration tab for Graphics and move relevant fields. --- src/citra_qt/CMakeLists.txt | 3 ++ src/citra_qt/configure.ui | 27 ++++++++---- src/citra_qt/configure_dialog.cpp | 1 + src/citra_qt/configure_general.cpp | 6 --- src/citra_qt/configure_general.ui | 34 --------------- src/citra_qt/configure_graphics.cpp | 32 ++++++++++++++ src/citra_qt/configure_graphics.h | 29 +++++++++++++ src/citra_qt/configure_graphics.ui | 85 +++++++++++++++++++++++++++++++++++++ 8 files changed, 169 insertions(+), 48 deletions(-) create mode 100644 src/citra_qt/configure_graphics.cpp create mode 100644 src/citra_qt/configure_graphics.h create mode 100644 src/citra_qt/configure_graphics.ui (limited to 'src') diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 4402ad995..e97d33da4 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -22,6 +22,7 @@ set(SRCS configure_debug.cpp configure_dialog.cpp configure_general.cpp + configure_graphics.cpp configure_system.cpp configure_input.cpp game_list.cpp @@ -54,6 +55,7 @@ set(HEADERS configure_debug.h configure_dialog.h configure_general.h + configure_graphics.h configure_system.h configure_input.h game_list.h @@ -73,6 +75,7 @@ set(UIS configure_audio.ui configure_debug.ui configure_general.ui + configure_graphics.ui configure_system.ui configure_input.ui hotkeys.ui diff --git a/src/citra_qt/configure.ui b/src/citra_qt/configure.ui index 15fe17323..28b4a3b90 100644 --- a/src/citra_qt/configure.ui +++ b/src/citra_qt/configure.ui @@ -34,11 +34,16 @@ Input - + - Audio + Graphics + + + Audio + + Debug @@ -80,12 +85,18 @@
configure_debug.h
1 - - ConfigureInput - QWidget -
configure_input.h
- 1 -
+ + ConfigureInput + QWidget +
configure_input.h
+ 1 +
+ + ConfigureGraphics + QWidget +
configure_graphics.h
+ 1 +
diff --git a/src/citra_qt/configure_dialog.cpp b/src/citra_qt/configure_dialog.cpp index 459fac4bb..7da8ad067 100644 --- a/src/citra_qt/configure_dialog.cpp +++ b/src/citra_qt/configure_dialog.cpp @@ -31,6 +31,7 @@ void ConfigureDialog::applyConfiguration() { ui->generalTab->applyConfiguration(); ui->systemTab->applyConfiguration(); ui->inputTab->applyConfiguration(); + ui->graphicsTab->applyConfiguration(); ui->audioTab->applyConfiguration(); ui->debugTab->applyConfiguration(); } diff --git a/src/citra_qt/configure_general.cpp b/src/citra_qt/configure_general.cpp index 62648e665..3e7a91885 100644 --- a/src/citra_qt/configure_general.cpp +++ b/src/citra_qt/configure_general.cpp @@ -23,17 +23,11 @@ void ConfigureGeneral::setConfiguration() { ui->toogle_deepscan->setChecked(UISettings::values.gamedir_deepscan); ui->toogle_check_exit->setChecked(UISettings::values.confirm_before_closing); ui->region_combobox->setCurrentIndex(Settings::values.region_value); - ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer); - ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit); - ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution); } void ConfigureGeneral::applyConfiguration() { UISettings::values.gamedir_deepscan = ui->toogle_deepscan->isChecked(); UISettings::values.confirm_before_closing = ui->toogle_check_exit->isChecked(); Settings::values.region_value = ui->region_combobox->currentIndex(); - Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked(); - Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked(); - Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked(); Settings::Apply(); } diff --git a/src/citra_qt/configure_general.ui b/src/citra_qt/configure_general.ui index 5eb309793..f993f7525 100644 --- a/src/citra_qt/configure_general.ui +++ b/src/citra_qt/configure_general.ui @@ -106,40 +106,6 @@
- - - - Performance - - - - - - - - Enable hardware renderer - - - - - - - Enable shader JIT - - - - - - - Enable scaled resolution - - - - - - - - diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp new file mode 100644 index 000000000..85a120686 --- /dev/null +++ b/src/citra_qt/configure_graphics.cpp @@ -0,0 +1,32 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "citra_qt/configure_graphics.h" +#include "ui_configure_graphics.h" + +#include "core/settings.h" + +ConfigureGraphics::ConfigureGraphics(QWidget *parent) : + QWidget(parent), + ui(new Ui::ConfigureGraphics) +{ + ui->setupUi(this); + this->setConfiguration(); +} + +ConfigureGraphics::~ConfigureGraphics() { +} + +void ConfigureGraphics::setConfiguration() { + ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer); + ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit); + ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution); +} + +void ConfigureGraphics::applyConfiguration() { + Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked(); + Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked(); + Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked(); + Settings::Apply(); +} diff --git a/src/citra_qt/configure_graphics.h b/src/citra_qt/configure_graphics.h new file mode 100644 index 000000000..dfb0c0461 --- /dev/null +++ b/src/citra_qt/configure_graphics.h @@ -0,0 +1,29 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include + +namespace Ui { +class ConfigureGraphics; +} + +class ConfigureGraphics : public QWidget +{ + Q_OBJECT + +public: + explicit ConfigureGraphics(QWidget *parent = nullptr); + ~ConfigureGraphics(); + + void applyConfiguration(); + +private: + void setConfiguration(); + +private: + std::unique_ptr ui; +}; diff --git a/src/citra_qt/configure_graphics.ui b/src/citra_qt/configure_graphics.ui new file mode 100644 index 000000000..336d49b19 --- /dev/null +++ b/src/citra_qt/configure_graphics.ui @@ -0,0 +1,85 @@ + + + ConfigureGraphics + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + Graphics + + + + + + Enable hardware renderer + + + + + + + Enable shader JIT + + + + + + + Enable scaled resolution + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + toogle_gdbstub + toggled(bool) + gdbport_spinbox + setEnabled(bool) + + + 84 + 157 + + + 342 + 158 + + + + + -- cgit v1.2.3