diff options
| author | 2017-02-01 00:22:47 -0800 | |
|---|---|---|
| committer | 2017-02-23 10:49:56 -0800 | |
| commit | e0a4450bbd40d69d288023ab5a95eaa0b00100fd (patch) | |
| tree | 288cacc8a345cea50d8c6a25c17e4ebbb1ec41d9 /src/citra_qt | |
| parent | Merge pull request #2485 from Kloen/killing-warnings-computehash64 (diff) | |
| download | yuzu-e0a4450bbd40d69d288023ab5a95eaa0b00100fd.tar.gz yuzu-e0a4450bbd40d69d288023ab5a95eaa0b00100fd.tar.xz yuzu-e0a4450bbd40d69d288023ab5a95eaa0b00100fd.zip | |
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 f776e16b2..2c03d3e93 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp | |||
| @@ -57,6 +57,15 @@ void Config::ReadValues() { | |||
| 57 | Settings::values.layout_option = | 57 | Settings::values.layout_option = |
| 58 | static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); | 58 | static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); |
| 59 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); | 59 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); |
| 60 | Settings::values.custom_layout = qt_config->value("custom_layout", false).toBool(); | ||
| 61 | Settings::values.custom_top_left = qt_config->value("custom_top_left", 0).toInt(); | ||
| 62 | Settings::values.custom_top_top = qt_config->value("custom_top_top", 0).toInt(); | ||
| 63 | Settings::values.custom_top_right = qt_config->value("custom_top_right", 400).toInt(); | ||
| 64 | Settings::values.custom_top_bottom = qt_config->value("custom_top_bottom", 240).toInt(); | ||
| 65 | Settings::values.custom_bottom_left = qt_config->value("custom_bottom_left", 40).toInt(); | ||
| 66 | Settings::values.custom_bottom_top = qt_config->value("custom_bottom_top", 240).toInt(); | ||
| 67 | Settings::values.custom_bottom_right = qt_config->value("custom_bottom_right", 360).toInt(); | ||
| 68 | Settings::values.custom_bottom_bottom = qt_config->value("custom_bottom_bottom", 480).toInt(); | ||
| 60 | qt_config->endGroup(); | 69 | qt_config->endGroup(); |
| 61 | 70 | ||
| 62 | qt_config->beginGroup("Audio"); | 71 | qt_config->beginGroup("Audio"); |
| @@ -166,6 +175,15 @@ void Config::SaveValues() { | |||
| 166 | qt_config->beginGroup("Layout"); | 175 | qt_config->beginGroup("Layout"); |
| 167 | qt_config->setValue("layout_option", static_cast<int>(Settings::values.layout_option)); | 176 | qt_config->setValue("layout_option", static_cast<int>(Settings::values.layout_option)); |
| 168 | qt_config->setValue("swap_screen", Settings::values.swap_screen); | 177 | qt_config->setValue("swap_screen", Settings::values.swap_screen); |
| 178 | qt_config->setValue("custom_layout", Settings::values.custom_layout); | ||
| 179 | qt_config->setValue("custom_top_left", Settings::values.custom_top_left); | ||
| 180 | qt_config->setValue("custom_top_top", Settings::values.custom_top_top); | ||
| 181 | qt_config->setValue("custom_top_right", Settings::values.custom_top_right); | ||
| 182 | qt_config->setValue("custom_top_bottom", Settings::values.custom_top_bottom); | ||
| 183 | qt_config->setValue("custom_bottom_left", Settings::values.custom_bottom_left); | ||
| 184 | qt_config->setValue("custom_bottom_top", Settings::values.custom_bottom_top); | ||
| 185 | qt_config->setValue("custom_bottom_right", Settings::values.custom_bottom_right); | ||
| 186 | qt_config->setValue("custom_bottom_bottom", Settings::values.custom_bottom_bottom); | ||
| 169 | qt_config->endGroup(); | 187 | qt_config->endGroup(); |
| 170 | 188 | ||
| 171 | qt_config->beginGroup("Audio"); | 189 | 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> |