diff options
| author | 2018-01-11 19:21:20 -0700 | |
|---|---|---|
| committer | 2018-01-12 19:11:03 -0700 | |
| commit | ebf9a784a9f7f4148a669dbb39e7cd50df779a14 (patch) | |
| tree | d585685a1c0a34b903af1d086d62560bf56bb29f /src/citra_qt/configuration/configure_system.cpp | |
| parent | config: Default CPU core to Unicorn. (diff) | |
| download | yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.gz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.xz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.zip | |
Massive removal of unused modules
Diffstat (limited to 'src/citra_qt/configuration/configure_system.cpp')
| -rw-r--r-- | src/citra_qt/configuration/configure_system.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/src/citra_qt/configuration/configure_system.cpp b/src/citra_qt/configuration/configure_system.cpp deleted file mode 100644 index d83c2db23..000000000 --- a/src/citra_qt/configuration/configure_system.cpp +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <QMessageBox> | ||
| 6 | #include "citra_qt/configuration/configure_system.h" | ||
| 7 | #include "citra_qt/ui_settings.h" | ||
| 8 | #include "core/core.h" | ||
| 9 | #include "ui_configure_system.h" | ||
| 10 | |||
| 11 | static const std::array<int, 12> days_in_month = {{ | ||
| 12 | 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, | ||
| 13 | }}; | ||
| 14 | |||
| 15 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { | ||
| 16 | ui->setupUi(this); | ||
| 17 | connect(ui->combo_birthmonth, | ||
| 18 | static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, | ||
| 19 | &ConfigureSystem::updateBirthdayComboBox); | ||
| 20 | connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, | ||
| 21 | &ConfigureSystem::refreshConsoleID); | ||
| 22 | |||
| 23 | this->setConfiguration(); | ||
| 24 | } | ||
| 25 | |||
| 26 | ConfigureSystem::~ConfigureSystem() {} | ||
| 27 | |||
| 28 | void ConfigureSystem::setConfiguration() { | ||
| 29 | enabled = !Core::System::GetInstance().IsPoweredOn(); | ||
| 30 | } | ||
| 31 | |||
| 32 | void ConfigureSystem::ReadSystemSettings() { | ||
| 33 | } | ||
| 34 | |||
| 35 | void ConfigureSystem::applyConfiguration() { | ||
| 36 | if (!enabled) | ||
| 37 | return; | ||
| 38 | } | ||
| 39 | |||
| 40 | void ConfigureSystem::updateBirthdayComboBox(int birthmonth_index) { | ||
| 41 | if (birthmonth_index < 0 || birthmonth_index >= 12) | ||
| 42 | return; | ||
| 43 | |||
| 44 | // store current day selection | ||
| 45 | int birthday_index = ui->combo_birthday->currentIndex(); | ||
| 46 | |||
| 47 | // get number of days in the new selected month | ||
| 48 | int days = days_in_month[birthmonth_index]; | ||
| 49 | |||
| 50 | // if the selected day is out of range, | ||
| 51 | // reset it to 1st | ||
| 52 | if (birthday_index < 0 || birthday_index >= days) | ||
| 53 | birthday_index = 0; | ||
| 54 | |||
| 55 | // update the day combo box | ||
| 56 | ui->combo_birthday->clear(); | ||
| 57 | for (int i = 1; i <= days; ++i) { | ||
| 58 | ui->combo_birthday->addItem(QString::number(i)); | ||
| 59 | } | ||
| 60 | |||
| 61 | // restore the day selection | ||
| 62 | ui->combo_birthday->setCurrentIndex(birthday_index); | ||
| 63 | } | ||
| 64 | |||
| 65 | void ConfigureSystem::refreshConsoleID() { | ||
| 66 | QMessageBox::StandardButton reply; | ||
| 67 | QString warning_text = tr("This will replace your current virtual 3DS with a new one. " | ||
| 68 | "Your current virtual 3DS will not be recoverable. " | ||
| 69 | "This might have unexpected effects in games. This might fail, " | ||
| 70 | "if you use an outdated config savegame. Continue?"); | ||
| 71 | reply = QMessageBox::critical(this, tr("Warning"), warning_text, | ||
| 72 | QMessageBox::No | QMessageBox::Yes); | ||
| 73 | if (reply == QMessageBox::No) | ||
| 74 | return; | ||
| 75 | u64 console_id{}; | ||
| 76 | ui->label_console_id->setText("Console ID: 0x" + QString::number(console_id, 16).toUpper()); | ||
| 77 | } | ||