diff options
| author | 2017-03-21 22:57:31 -0400 | |
|---|---|---|
| committer | 2017-03-21 22:57:31 -0400 | |
| commit | ccc3985cc0efe520bf4f53d4fcac7bfe1abdc82c (patch) | |
| tree | 38120c3cf4e7af72dc8122f9f278b77aa52b663b /src/citra_qt | |
| parent | Removed a linebreak from the README. (diff) | |
| parent | Add custom layout settings. (diff) | |
| download | yuzu-ccc3985cc0efe520bf4f53d4fcac7bfe1abdc82c.tar.gz yuzu-ccc3985cc0efe520bf4f53d4fcac7bfe1abdc82c.tar.xz yuzu-ccc3985cc0efe520bf4f53d4fcac7bfe1abdc82c.zip | |
Merge pull request #2512 from SonofUgly/custom-layout
Add custom layout settings.
Diffstat (limited to 'src/citra_qt')
| -rw-r--r-- | src/citra_qt/config.cpp | 18 | ||||
| -rw-r--r-- | src/citra_qt/configure_graphics.cpp | 2 | ||||
| -rw-r--r-- | src/citra_qt/configure_graphics.ui | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 6ccfa1577..bf0ac7c66 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp | |||
| @@ -79,6 +79,15 @@ void Config::ReadValues() { | |||
| 79 | Settings::values.layout_option = | 79 | Settings::values.layout_option = |
| 80 | static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); | 80 | static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); |
| 81 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); | 81 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); |
| 82 | Settings::values.custom_layout = qt_config->value("custom_layout", false).toBool(); | ||
| 83 | Settings::values.custom_top_left = qt_config->value("custom_top_left", 0).toInt(); | ||
| 84 | Settings::values.custom_top_top = qt_config->value("custom_top_top", 0).toInt(); | ||
| 85 | Settings::values.custom_top_right = qt_config->value("custom_top_right", 400).toInt(); | ||
| 86 | Settings::values.custom_top_bottom = qt_config->value("custom_top_bottom", 240).toInt(); | ||
| 87 | Settings::values.custom_bottom_left = qt_config->value("custom_bottom_left", 40).toInt(); | ||
| 88 | Settings::values.custom_bottom_top = qt_config->value("custom_bottom_top", 240).toInt(); | ||
| 89 | Settings::values.custom_bottom_right = qt_config->value("custom_bottom_right", 360).toInt(); | ||
| 90 | Settings::values.custom_bottom_bottom = qt_config->value("custom_bottom_bottom", 480).toInt(); | ||
| 82 | qt_config->endGroup(); | 91 | qt_config->endGroup(); |
| 83 | 92 | ||
| 84 | qt_config->beginGroup("Audio"); | 93 | qt_config->beginGroup("Audio"); |
| @@ -207,6 +216,15 @@ void Config::SaveValues() { | |||
| 207 | qt_config->beginGroup("Layout"); | 216 | qt_config->beginGroup("Layout"); |
| 208 | qt_config->setValue("layout_option", static_cast<int>(Settings::values.layout_option)); | 217 | qt_config->setValue("layout_option", static_cast<int>(Settings::values.layout_option)); |
| 209 | qt_config->setValue("swap_screen", Settings::values.swap_screen); | 218 | qt_config->setValue("swap_screen", Settings::values.swap_screen); |
| 219 | qt_config->setValue("custom_layout", Settings::values.custom_layout); | ||
| 220 | qt_config->setValue("custom_top_left", Settings::values.custom_top_left); | ||
| 221 | qt_config->setValue("custom_top_top", Settings::values.custom_top_top); | ||
| 222 | qt_config->setValue("custom_top_right", Settings::values.custom_top_right); | ||
| 223 | qt_config->setValue("custom_top_bottom", Settings::values.custom_top_bottom); | ||
| 224 | qt_config->setValue("custom_bottom_left", Settings::values.custom_bottom_left); | ||
| 225 | qt_config->setValue("custom_bottom_top", Settings::values.custom_bottom_top); | ||
| 226 | qt_config->setValue("custom_bottom_right", Settings::values.custom_bottom_right); | ||
| 227 | qt_config->setValue("custom_bottom_bottom", Settings::values.custom_bottom_bottom); | ||
| 210 | qt_config->endGroup(); | 228 | qt_config->endGroup(); |
| 211 | 229 | ||
| 212 | qt_config->beginGroup("Audio"); | 230 | 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) | |||
| 14 | this->setConfiguration(); | 14 | this->setConfiguration(); |
| 15 | 15 | ||
| 16 | ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 16 | ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 17 | |||
| 18 | ui->layoutBox->setEnabled(!Settings::values.custom_layout); | ||
| 17 | } | 19 | } |
| 18 | 20 | ||
| 19 | ConfigureGraphics::~ConfigureGraphics() {} | 21 | 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 @@ | |||
| 126 | </layout> | 126 | </layout> |
| 127 | </item> | 127 | </item> |
| 128 | <item> | 128 | <item> |
| 129 | <widget class="QGroupBox" name="groupBox2"> | 129 | <widget class="QGroupBox" name="layoutBox"> |
| 130 | <property name="title"> | 130 | <property name="title"> |
| 131 | <string>Layout</string> | 131 | <string>Layout</string> |
| 132 | </property> | 132 | </property> |