From e0a4450bbd40d69d288023ab5a95eaa0b00100fd Mon Sep 17 00:00:00 2001 From: SonofUgly Date: Wed, 1 Feb 2017 00:22:47 -0800 Subject: Add custom layout settings. --- src/citra_qt/config.cpp | 18 ++++++++++++++++++ src/citra_qt/configure_graphics.cpp | 2 ++ src/citra_qt/configure_graphics.ui | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index f776e16b2..2c03d3e93 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -57,6 +57,15 @@ void Config::ReadValues() { Settings::values.layout_option = static_cast(qt_config->value("layout_option").toInt()); Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); + Settings::values.custom_layout = qt_config->value("custom_layout", false).toBool(); + Settings::values.custom_top_left = qt_config->value("custom_top_left", 0).toInt(); + Settings::values.custom_top_top = qt_config->value("custom_top_top", 0).toInt(); + Settings::values.custom_top_right = qt_config->value("custom_top_right", 400).toInt(); + Settings::values.custom_top_bottom = qt_config->value("custom_top_bottom", 240).toInt(); + Settings::values.custom_bottom_left = qt_config->value("custom_bottom_left", 40).toInt(); + Settings::values.custom_bottom_top = qt_config->value("custom_bottom_top", 240).toInt(); + Settings::values.custom_bottom_right = qt_config->value("custom_bottom_right", 360).toInt(); + Settings::values.custom_bottom_bottom = qt_config->value("custom_bottom_bottom", 480).toInt(); qt_config->endGroup(); qt_config->beginGroup("Audio"); @@ -166,6 +175,15 @@ void Config::SaveValues() { qt_config->beginGroup("Layout"); qt_config->setValue("layout_option", static_cast(Settings::values.layout_option)); qt_config->setValue("swap_screen", Settings::values.swap_screen); + qt_config->setValue("custom_layout", Settings::values.custom_layout); + qt_config->setValue("custom_top_left", Settings::values.custom_top_left); + qt_config->setValue("custom_top_top", Settings::values.custom_top_top); + qt_config->setValue("custom_top_right", Settings::values.custom_top_right); + qt_config->setValue("custom_top_bottom", Settings::values.custom_top_bottom); + qt_config->setValue("custom_bottom_left", Settings::values.custom_bottom_left); + qt_config->setValue("custom_bottom_top", Settings::values.custom_bottom_top); + qt_config->setValue("custom_bottom_right", Settings::values.custom_bottom_right); + qt_config->setValue("custom_bottom_bottom", Settings::values.custom_bottom_bottom); qt_config->endGroup(); qt_config->beginGroup("Audio"); diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp index 54f799b47..4c0bd4246 100644 --- a/src/citra_qt/configure_graphics.cpp +++ b/src/citra_qt/configure_graphics.cpp @@ -14,6 +14,8 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent) this->setConfiguration(); ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn()); + + ui->layoutBox->setEnabled(!Settings::values.custom_layout); } ConfigureGraphics::~ConfigureGraphics() {} diff --git a/src/citra_qt/configure_graphics.ui b/src/citra_qt/configure_graphics.ui index a091f4c60..228f2a869 100644 --- a/src/citra_qt/configure_graphics.ui +++ b/src/citra_qt/configure_graphics.ui @@ -126,7 +126,7 @@ - + Layout -- cgit v1.2.3