diff options
Diffstat (limited to 'src/yuzu/configuration')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 18 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_player_widget.cpp | 26 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_profile_manager.cpp | 4 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 4 |
5 files changed, 29 insertions, 25 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 9745757c7..400917f9d 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -1094,7 +1094,7 @@ void ConfigureInputPlayer::SetConnectableControllers() { }; if (npad_style_set.fullkey == 1) { - add_item(Core::HID::NpadStyleIndex::ProController, tr("Pro Controller")); + add_item(Core::HID::NpadStyleIndex::Fullkey, tr("Pro Controller")); } if (npad_style_set.joycon_dual == 1) { @@ -1149,7 +1149,7 @@ Core::HID::NpadStyleIndex ConfigureInputPlayer::GetControllerTypeFromIndex(int i [index](const auto& pair) { return pair.first == index; }); if (it == index_controller_type_pairs.end()) { - return Core::HID::NpadStyleIndex::ProController; + return Core::HID::NpadStyleIndex::Fullkey; } return it->second; @@ -1178,7 +1178,7 @@ void ConfigureInputPlayer::UpdateInputDevices() { void ConfigureInputPlayer::UpdateControllerAvailableButtons() { auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex()); if (debug) { - layout = Core::HID::NpadStyleIndex::ProController; + layout = Core::HID::NpadStyleIndex::Fullkey; } // List of all the widgets that will be hidden by any of the following layouts that need @@ -1206,7 +1206,7 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() { std::vector<QWidget*> layout_hidden; switch (layout) { - case Core::HID::NpadStyleIndex::ProController: + case Core::HID::NpadStyleIndex::Fullkey: case Core::HID::NpadStyleIndex::Handheld: layout_hidden = { ui->buttonShoulderButtonsSLSRLeft, @@ -1254,7 +1254,7 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() { void ConfigureInputPlayer::UpdateControllerEnabledButtons() { auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex()); if (debug) { - layout = Core::HID::NpadStyleIndex::ProController; + layout = Core::HID::NpadStyleIndex::Fullkey; } // List of all the widgets that will be disabled by any of the following layouts that need @@ -1271,7 +1271,7 @@ void ConfigureInputPlayer::UpdateControllerEnabledButtons() { std::vector<QWidget*> layout_disable; switch (layout) { - case Core::HID::NpadStyleIndex::ProController: + case Core::HID::NpadStyleIndex::Fullkey: case Core::HID::NpadStyleIndex::JoyconDual: case Core::HID::NpadStyleIndex::Handheld: case Core::HID::NpadStyleIndex::JoyconLeft: @@ -1304,7 +1304,7 @@ void ConfigureInputPlayer::UpdateMotionButtons() { // Show/hide the "Motion 1/2" groupboxes depending on the currently selected controller. switch (GetControllerTypeFromIndex(ui->comboControllerType->currentIndex())) { - case Core::HID::NpadStyleIndex::ProController: + case Core::HID::NpadStyleIndex::Fullkey: case Core::HID::NpadStyleIndex::JoyconLeft: case Core::HID::NpadStyleIndex::Handheld: // Show "Motion 1" and hide "Motion 2". @@ -1333,11 +1333,11 @@ void ConfigureInputPlayer::UpdateMotionButtons() { void ConfigureInputPlayer::UpdateControllerButtonNames() { auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex()); if (debug) { - layout = Core::HID::NpadStyleIndex::ProController; + layout = Core::HID::NpadStyleIndex::Fullkey; } switch (layout) { - case Core::HID::NpadStyleIndex::ProController: + case Core::HID::NpadStyleIndex::Fullkey: case Core::HID::NpadStyleIndex::JoyconDual: case Core::HID::NpadStyleIndex::Handheld: case Core::HID::NpadStyleIndex::JoyconLeft: diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index 19fdca7d3..b3d9d8006 100644 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp @@ -244,7 +244,7 @@ void PlayerControlPreview::paintEvent(QPaintEvent* event) { case Core::HID::NpadStyleIndex::GameCube: DrawGCController(p, center); break; - case Core::HID::NpadStyleIndex::ProController: + case Core::HID::NpadStyleIndex::Fullkey: default: DrawProController(p, center); break; @@ -845,12 +845,12 @@ void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center) DrawSymbol(p, face_center + QPoint(-face_distance, 1), Symbol::Y, text_size); // D-pad buttons - const QPointF dpad_postion = center + QPoint(-61, 0); - DrawArrowButton(p, dpad_postion, Direction::Up, button_values[DUp]); - DrawArrowButton(p, dpad_postion, Direction::Left, button_values[DLeft]); - DrawArrowButton(p, dpad_postion, Direction::Right, button_values[DRight]); - DrawArrowButton(p, dpad_postion, Direction::Down, button_values[DDown]); - DrawArrowButtonOutline(p, dpad_postion); + const QPointF dpad_position = center + QPoint(-61, 0); + DrawArrowButton(p, dpad_position, Direction::Up, button_values[DUp]); + DrawArrowButton(p, dpad_position, Direction::Left, button_values[DLeft]); + DrawArrowButton(p, dpad_position, Direction::Right, button_values[DRight]); + DrawArrowButton(p, dpad_position, Direction::Down, button_values[DDown]); + DrawArrowButtonOutline(p, dpad_position); // ZL and ZR buttons p.setPen(colors.outline); @@ -935,13 +935,13 @@ void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) { DrawSymbol(p, center + QPoint(100, -83), Symbol::Y, text_size); // D-pad buttons - const QPointF dpad_postion = center + QPoint(-61, 37); + const QPointF dpad_position = center + QPoint(-61, 37); const float dpad_size = 0.8f; - DrawArrowButton(p, dpad_postion, Direction::Up, button_values[DUp], dpad_size); - DrawArrowButton(p, dpad_postion, Direction::Left, button_values[DLeft], dpad_size); - DrawArrowButton(p, dpad_postion, Direction::Right, button_values[DRight], dpad_size); - DrawArrowButton(p, dpad_postion, Direction::Down, button_values[DDown], dpad_size); - DrawArrowButtonOutline(p, dpad_postion, dpad_size); + DrawArrowButton(p, dpad_position, Direction::Up, button_values[DUp], dpad_size); + DrawArrowButton(p, dpad_position, Direction::Left, button_values[DLeft], dpad_size); + DrawArrowButton(p, dpad_position, Direction::Right, button_values[DRight], dpad_size); + DrawArrowButton(p, dpad_position, Direction::Down, button_values[DDown], dpad_size); + DrawArrowButtonOutline(p, dpad_position, dpad_size); // Minus and Plus buttons p.setPen(colors.outline); diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index fa5f383d6..12a04b9a0 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp @@ -205,6 +205,7 @@ void ConfigureProfileManager::AddUser() { const auto uuid = Common::UUID::MakeRandom(); profile_manager.CreateNewUser(uuid, username.toStdString()); + profile_manager.WriteUserSaveFile(); item_model->appendRow(new QStandardItem{GetIcon(uuid), FormatUserEntryText(username, uuid)}); } @@ -228,6 +229,7 @@ void ConfigureProfileManager::RenameUser() { std::copy(username_std.begin(), username_std.end(), profile.username.begin()); profile_manager.SetProfileBase(*uuid, profile); + profile_manager.WriteUserSaveFile(); item_model->setItem( user, 0, @@ -256,6 +258,8 @@ void ConfigureProfileManager::DeleteUser(const Common::UUID& uuid) { return; } + profile_manager.WriteUserSaveFile(); + item_model->removeRows(tree_view->currentIndex().row(), 1); tree_view->clearSelection(); diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 7cbf43775..b0b84f967 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -121,7 +121,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) { } if (setting->Id() == Settings::values.region_index.Id()) { - // Keep track of the region_index (and langauge_index) combobox to validate the selected + // Keep track of the region_index (and language_index) combobox to validate the selected // settings combo_region = widget->combobox; } else if (setting->Id() == Settings::values.language_index.Id()) { diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 941683a43..85f4f7655 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -750,12 +750,12 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati } apply_funcs.push_back([load_func, setting_](bool powered_on) { - if (setting_->RuntimeModfiable() || !powered_on) { + if (setting_->RuntimeModifiable() || !powered_on) { load_func(); } }); - bool enable = runtime_lock || setting.RuntimeModfiable(); + bool enable = runtime_lock || setting.RuntimeModifiable(); if (setting.Switchable() && Settings::IsConfiguringGlobal() && !runtime_lock) { enable &= setting.UsingGlobal(); } |