diff options
author | pineappleEA <pineaea@gmail.com> | 2024-02-20 03:21:02 +0100 |
---|---|---|
committer | pineappleEA <pineaea@gmail.com> | 2024-02-20 03:21:02 +0100 |
commit | 64bd48fad59e60a5fa48c8ce512fbe80ff532e90 (patch) | |
tree | 8c8b45c1962fcf6f520c8f3462d6d92eb51ed699 | |
parent | 742bf252528a1e3dfcc11d4557748d634c22b70a (diff) |
early-access version 4154EA-4154
10 files changed, 114 insertions, 40 deletions
@@ -1,7 +1,7 @@ | |||
1 | yuzu emulator early access | 1 | yuzu emulator early access |
2 | ============= | 2 | ============= |
3 | 3 | ||
4 | This is the source code for early-access 4153. | 4 | This is the source code for early-access 4154. |
5 | 5 | ||
6 | ## Legal Notice | 6 | ## Legal Notice |
7 | 7 | ||
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 8f724835e..03d81ceb3 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt | |||
@@ -75,6 +75,9 @@ abstract class SettingsItem( | |||
75 | get() = NativeLibrary.isRunning() && !setting.global && | 75 | get() = NativeLibrary.isRunning() && !setting.global && |
76 | !NativeConfig.isPerGameConfigLoaded() | 76 | !NativeConfig.isPerGameConfigLoaded() |
77 | 77 | ||
78 | val clearable: Boolean | ||
79 | get() = !setting.global && NativeConfig.isPerGameConfigLoaded() | ||
80 | |||
78 | companion object { | 81 | companion object { |
79 | const val TYPE_HEADER = 0 | 82 | const val TYPE_HEADER = 0 |
80 | const val TYPE_SWITCH = 1 | 83 | const val TYPE_SWITCH = 1 |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/DateTimeViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/DateTimeViewHolder.kt index 367db7fd2..0309fad59 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/DateTimeViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/DateTimeViewHolder.kt | |||
@@ -13,7 +13,6 @@ import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding | |||
13 | import org.yuzu.yuzu_emu.features.settings.model.view.DateTimeSetting | 13 | import org.yuzu.yuzu_emu.features.settings.model.view.DateTimeSetting |
14 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem | 14 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem |
15 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter | 15 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter |
16 | import org.yuzu.yuzu_emu.utils.NativeConfig | ||
17 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible | 16 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible |
18 | 17 | ||
19 | class DateTimeViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : | 18 | class DateTimeViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : |
@@ -32,9 +31,7 @@ class DateTimeViewHolder(val binding: ListItemSettingBinding, adapter: SettingsA | |||
32 | val dateFormatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM) | 31 | val dateFormatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM) |
33 | binding.textSettingValue.text = dateFormatter.format(zonedTime) | 32 | binding.textSettingValue.text = dateFormatter.format(zonedTime) |
34 | 33 | ||
35 | binding.buttonClear.setVisible( | 34 | binding.buttonClear.setVisible(setting.clearable) |
36 | !setting.setting.global || NativeConfig.isPerGameConfigLoaded() | ||
37 | ) | ||
38 | binding.buttonClear.setOnClickListener { | 35 | binding.buttonClear.setOnClickListener { |
39 | adapter.onClearClick(setting, bindingAdapterPosition) | 36 | adapter.onClearClick(setting, bindingAdapterPosition) |
40 | } | 37 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SingleChoiceViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SingleChoiceViewHolder.kt index e2fe0b072..489f55455 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SingleChoiceViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SingleChoiceViewHolder.kt | |||
@@ -10,7 +10,6 @@ import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem | |||
10 | import org.yuzu.yuzu_emu.features.settings.model.view.SingleChoiceSetting | 10 | import org.yuzu.yuzu_emu.features.settings.model.view.SingleChoiceSetting |
11 | import org.yuzu.yuzu_emu.features.settings.model.view.StringSingleChoiceSetting | 11 | import org.yuzu.yuzu_emu.features.settings.model.view.StringSingleChoiceSetting |
12 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter | 12 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter |
13 | import org.yuzu.yuzu_emu.utils.NativeConfig | ||
14 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible | 13 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible |
15 | 14 | ||
16 | class SingleChoiceViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : | 15 | class SingleChoiceViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : |
@@ -48,9 +47,7 @@ class SingleChoiceViewHolder(val binding: ListItemSettingBinding, adapter: Setti | |||
48 | binding.textSettingValue.setVisible(false) | 47 | binding.textSettingValue.setVisible(false) |
49 | } | 48 | } |
50 | 49 | ||
51 | binding.buttonClear.setVisible( | 50 | binding.buttonClear.setVisible(setting.clearable) |
52 | !setting.setting.global || NativeConfig.isPerGameConfigLoaded() | ||
53 | ) | ||
54 | binding.buttonClear.setOnClickListener { | 51 | binding.buttonClear.setOnClickListener { |
55 | adapter.onClearClick(setting, bindingAdapterPosition) | 52 | adapter.onClearClick(setting, bindingAdapterPosition) |
56 | } | 53 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SliderViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SliderViewHolder.kt index a37b59b44..90a7138cb 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SliderViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SliderViewHolder.kt | |||
@@ -9,7 +9,6 @@ import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding | |||
9 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem | 9 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem |
10 | import org.yuzu.yuzu_emu.features.settings.model.view.SliderSetting | 10 | import org.yuzu.yuzu_emu.features.settings.model.view.SliderSetting |
11 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter | 11 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter |
12 | import org.yuzu.yuzu_emu.utils.NativeConfig | ||
13 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible | 12 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible |
14 | 13 | ||
15 | class SliderViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : | 14 | class SliderViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) : |
@@ -28,9 +27,7 @@ class SliderViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAda | |||
28 | setting.units | 27 | setting.units |
29 | ) | 28 | ) |
30 | 29 | ||
31 | binding.buttonClear.setVisible( | 30 | binding.buttonClear.setVisible(setting.clearable) |
32 | !setting.setting.global || NativeConfig.isPerGameConfigLoaded() | ||
33 | ) | ||
34 | binding.buttonClear.setOnClickListener { | 31 | binding.buttonClear.setOnClickListener { |
35 | adapter.onClearClick(setting, bindingAdapterPosition) | 32 | adapter.onClearClick(setting, bindingAdapterPosition) |
36 | } | 33 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SwitchSettingViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SwitchSettingViewHolder.kt index 53f7b301f..e5763264a 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SwitchSettingViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SwitchSettingViewHolder.kt | |||
@@ -9,7 +9,6 @@ import org.yuzu.yuzu_emu.databinding.ListItemSettingSwitchBinding | |||
9 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem | 9 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem |
10 | import org.yuzu.yuzu_emu.features.settings.model.view.SwitchSetting | 10 | import org.yuzu.yuzu_emu.features.settings.model.view.SwitchSetting |
11 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter | 11 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter |
12 | import org.yuzu.yuzu_emu.utils.NativeConfig | ||
13 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible | 12 | import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible |
14 | 13 | ||
15 | class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter: SettingsAdapter) : | 14 | class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter: SettingsAdapter) : |
@@ -29,9 +28,7 @@ class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter | |||
29 | adapter.onBooleanClick(setting, binding.switchWidget.isChecked, bindingAdapterPosition) | 28 | adapter.onBooleanClick(setting, binding.switchWidget.isChecked, bindingAdapterPosition) |
30 | } | 29 | } |
31 | 30 | ||
32 | binding.buttonClear.setVisible( | 31 | binding.buttonClear.setVisible(setting.clearable) |
33 | !setting.setting.global || NativeConfig.isPerGameConfigLoaded() | ||
34 | ) | ||
35 | binding.buttonClear.setOnClickListener { | 32 | binding.buttonClear.setOnClickListener { |
36 | adapter.onClearClick(setting, bindingAdapterPosition) | 33 | adapter.onClearClick(setting, bindingAdapterPosition) |
37 | } | 34 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt index ed112a38d..737e03584 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | |||
@@ -28,6 +28,7 @@ import org.yuzu.yuzu_emu.features.input.NativeInput | |||
28 | import org.yuzu.yuzu_emu.R | 28 | import org.yuzu.yuzu_emu.R |
29 | import org.yuzu.yuzu_emu.features.input.model.NativeAnalog | 29 | import org.yuzu.yuzu_emu.features.input.model.NativeAnalog |
30 | import org.yuzu.yuzu_emu.features.input.model.NativeButton | 30 | import org.yuzu.yuzu_emu.features.input.model.NativeButton |
31 | import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex | ||
31 | import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting | 32 | import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting |
32 | import org.yuzu.yuzu_emu.features.settings.model.IntSetting | 33 | import org.yuzu.yuzu_emu.features.settings.model.IntSetting |
33 | import org.yuzu.yuzu_emu.overlay.model.OverlayControl | 34 | import org.yuzu.yuzu_emu.overlay.model.OverlayControl |
@@ -99,12 +100,10 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : | |||
99 | } | 100 | } |
100 | 101 | ||
101 | var shouldUpdateView = false | 102 | var shouldUpdateView = false |
102 | val playerIndex = | 103 | val playerIndex = when (NativeInput.getStyleIndex(0)) { |
103 | if (NativeInput.isHandheldOnly()) { | 104 | NpadStyleIndex.Handheld -> 8 |
104 | NativeInput.ConsoleDevice | 105 | else -> 0 |
105 | } else { | 106 | } |
106 | NativeInput.Player1Device | ||
107 | } | ||
108 | 107 | ||
109 | for (button in overlayButtons) { | 108 | for (button in overlayButtons) { |
110 | if (!button.updateStatus(event)) { | 109 | if (!button.updateStatus(event)) { |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 2fd4434b0..62ce5beac 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
@@ -1604,6 +1604,7 @@ void GMainWindow::ConnectMenuEvents() { | |||
1604 | connect_menu(ui->action_Open_yuzu_Folder, &GMainWindow::OnOpenYuzuFolder); | 1604 | connect_menu(ui->action_Open_yuzu_Folder, &GMainWindow::OnOpenYuzuFolder); |
1605 | connect_menu(ui->action_Verify_installed_contents, &GMainWindow::OnVerifyInstalledContents); | 1605 | connect_menu(ui->action_Verify_installed_contents, &GMainWindow::OnVerifyInstalledContents); |
1606 | connect_menu(ui->action_Install_Firmware, &GMainWindow::OnInstallFirmware); | 1606 | connect_menu(ui->action_Install_Firmware, &GMainWindow::OnInstallFirmware); |
1607 | connect_menu(ui->action_Install_Keys, &GMainWindow::OnInstallDecryptionKeys); | ||
1607 | connect_menu(ui->action_About, &GMainWindow::OnAbout); | 1608 | connect_menu(ui->action_About, &GMainWindow::OnAbout); |
1608 | } | 1609 | } |
1609 | 1610 | ||
@@ -1633,6 +1634,7 @@ void GMainWindow::UpdateMenuState() { | |||
1633 | } | 1634 | } |
1634 | 1635 | ||
1635 | ui->action_Install_Firmware->setEnabled(!emulation_running); | 1636 | ui->action_Install_Firmware->setEnabled(!emulation_running); |
1637 | ui->action_Install_Keys->setEnabled(!emulation_running); | ||
1636 | 1638 | ||
1637 | for (QAction* action : applet_actions) { | 1639 | for (QAction* action : applet_actions) { |
1638 | action->setEnabled(is_firmware_available && !emulation_running); | 1640 | action->setEnabled(is_firmware_available && !emulation_running); |
@@ -4169,9 +4171,8 @@ void GMainWindow::OnInstallFirmware() { | |||
4169 | return; | 4171 | return; |
4170 | } | 4172 | } |
4171 | 4173 | ||
4172 | QString firmware_source_location = | 4174 | const QString firmware_source_location = QFileDialog::getExistingDirectory( |
4173 | QFileDialog::getExistingDirectory(this, tr("Select Dumped Firmware Source Location"), | 4175 | this, tr("Select Dumped Firmware Source Location"), {}, QFileDialog::ShowDirsOnly); |
4174 | QString::fromStdString(""), QFileDialog::ShowDirsOnly); | ||
4175 | if (firmware_source_location.isEmpty()) { | 4176 | if (firmware_source_location.isEmpty()) { |
4176 | return; | 4177 | return; |
4177 | } | 4178 | } |
@@ -4202,8 +4203,9 @@ void GMainWindow::OnInstallFirmware() { | |||
4202 | std::vector<std::filesystem::path> out; | 4203 | std::vector<std::filesystem::path> out; |
4203 | const Common::FS::DirEntryCallable callback = | 4204 | const Common::FS::DirEntryCallable callback = |
4204 | [&out](const std::filesystem::directory_entry& entry) { | 4205 | [&out](const std::filesystem::directory_entry& entry) { |
4205 | if (entry.path().has_extension() && entry.path().extension() == ".nca") | 4206 | if (entry.path().has_extension() && entry.path().extension() == ".nca") { |
4206 | out.emplace_back(entry.path()); | 4207 | out.emplace_back(entry.path()); |
4208 | } | ||
4207 | 4209 | ||
4208 | return true; | 4210 | return true; |
4209 | }; | 4211 | }; |
@@ -4235,7 +4237,6 @@ void GMainWindow::OnInstallFirmware() { | |||
4235 | auto firmware_vdir = sysnand_content_vdir->GetDirectoryRelative("registered"); | 4237 | auto firmware_vdir = sysnand_content_vdir->GetDirectoryRelative("registered"); |
4236 | 4238 | ||
4237 | bool success = true; | 4239 | bool success = true; |
4238 | bool cancelled = false; | ||
4239 | int i = 0; | 4240 | int i = 0; |
4240 | for (const auto& firmware_src_path : out) { | 4241 | for (const auto& firmware_src_path : out) { |
4241 | i++; | 4242 | i++; |
@@ -4250,24 +4251,22 @@ void GMainWindow::OnInstallFirmware() { | |||
4250 | success = false; | 4251 | success = false; |
4251 | } | 4252 | } |
4252 | 4253 | ||
4253 | if (QtProgressCallback(100, 20 + (int)(((float)(i) / (float)out.size()) * 70.0))) { | 4254 | if (QtProgressCallback( |
4254 | success = false; | 4255 | 100, 20 + static_cast<int>(((i) / static_cast<float>(out.size())) * 70.0))) { |
4255 | cancelled = true; | 4256 | progress.close(); |
4256 | break; | 4257 | QMessageBox::warning( |
4258 | this, tr("Firmware install failed"), | ||
4259 | tr("Firmware installation cancelled, firmware may be in bad state, " | ||
4260 | "restart yuzu or re-install firmware.")); | ||
4261 | return; | ||
4257 | } | 4262 | } |
4258 | } | 4263 | } |
4259 | 4264 | ||
4260 | if (!success && !cancelled) { | 4265 | if (!success) { |
4261 | progress.close(); | 4266 | progress.close(); |
4262 | QMessageBox::critical(this, tr("Firmware install failed"), | 4267 | QMessageBox::critical(this, tr("Firmware install failed"), |
4263 | tr("One or more firmware files failed to copy into NAND.")); | 4268 | tr("One or more firmware files failed to copy into NAND.")); |
4264 | return; | 4269 | return; |
4265 | } else if (cancelled) { | ||
4266 | progress.close(); | ||
4267 | QMessageBox::warning(this, tr("Firmware install failed"), | ||
4268 | tr("Firmware installation cancelled, firmware may be in bad state, " | ||
4269 | "restart yuzu or re-install firmware.")); | ||
4270 | return; | ||
4271 | } | 4270 | } |
4272 | 4271 | ||
4273 | // Re-scan VFS for the newly placed firmware files. | 4272 | // Re-scan VFS for the newly placed firmware files. |
@@ -4295,6 +4294,84 @@ void GMainWindow::OnInstallFirmware() { | |||
4295 | OnCheckFirmwareDecryption(); | 4294 | OnCheckFirmwareDecryption(); |
4296 | } | 4295 | } |
4297 | 4296 | ||
4297 | void GMainWindow::OnInstallDecryptionKeys() { | ||
4298 | // Don't do this while emulation is running. | ||
4299 | if (emu_thread != nullptr && emu_thread->IsRunning()) { | ||
4300 | return; | ||
4301 | } | ||
4302 | |||
4303 | const QString key_source_location = QFileDialog::getOpenFileName( | ||
4304 | this, tr("Select Dumped Keys Location"), {}, QStringLiteral("prod.keys (prod.keys)"), {}, | ||
4305 | QFileDialog::ReadOnly); | ||
4306 | if (key_source_location.isEmpty()) { | ||
4307 | return; | ||
4308 | } | ||
4309 | |||
4310 | // Verify that it contains prod.keys, title.keys and optionally, key_retail.bin | ||
4311 | LOG_INFO(Frontend, "Installing key files from {}", key_source_location.toStdString()); | ||
4312 | |||
4313 | const std::filesystem::path prod_key_path = key_source_location.toStdString(); | ||
4314 | const std::filesystem::path key_source_path = prod_key_path.parent_path(); | ||
4315 | if (!Common::FS::IsDir(key_source_path)) { | ||
4316 | return; | ||
4317 | } | ||
4318 | |||
4319 | bool prod_keys_found = false; | ||
4320 | std::vector<std::filesystem::path> source_key_files; | ||
4321 | |||
4322 | if (Common::FS::Exists(prod_key_path)) { | ||
4323 | prod_keys_found = true; | ||
4324 | source_key_files.emplace_back(prod_key_path); | ||
4325 | } | ||
4326 | |||
4327 | if (Common::FS::Exists(key_source_path / "title.keys")) { | ||
4328 | source_key_files.emplace_back(key_source_path / "title.keys"); | ||
4329 | } | ||
4330 | |||
4331 | if (Common::FS::Exists(key_source_path / "key_retail.bin")) { | ||
4332 | source_key_files.emplace_back(key_source_path / "key_retail.bin"); | ||
4333 | } | ||
4334 | |||
4335 | // There should be at least prod.keys. | ||
4336 | if (source_key_files.empty() || !prod_keys_found) { | ||
4337 | QMessageBox::warning(this, tr("Decryption Keys install failed"), | ||
4338 | tr("prod.keys is a required decryption key file.")); | ||
4339 | return; | ||
4340 | } | ||
4341 | |||
4342 | const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); | ||
4343 | for (auto key_file : source_key_files) { | ||
4344 | std::filesystem::path destination_key_file = yuzu_keys_dir / key_file.filename(); | ||
4345 | if (!std::filesystem::copy_file(key_file, destination_key_file, | ||
4346 | std::filesystem::copy_options::overwrite_existing)) { | ||
4347 | LOG_ERROR(Frontend, "Failed to copy file {} to {}", key_file.string(), | ||
4348 | destination_key_file.string()); | ||
4349 | QMessageBox::critical(this, tr("Decryption Keys install failed"), | ||
4350 | tr("One or more keys failed to copy.")); | ||
4351 | return; | ||
4352 | } | ||
4353 | } | ||
4354 | |||
4355 | // Reinitialize the key manager, re-read the vfs (for update/dlc files), | ||
4356 | // and re-populate the game list in the UI if the user has already added | ||
4357 | // game folders. | ||
4358 | Core::Crypto::KeyManager::Instance().ReloadKeys(); | ||
4359 | system->GetFileSystemController().CreateFactories(*vfs); | ||
4360 | game_list->PopulateAsync(UISettings::values.game_dirs); | ||
4361 | |||
4362 | if (ContentManager::AreKeysPresent()) { | ||
4363 | QMessageBox::information(this, tr("Decryption Keys install succeeded"), | ||
4364 | tr("Decryption Keys were successfully installed")); | ||
4365 | } else { | ||
4366 | QMessageBox::critical( | ||
4367 | this, tr("Decryption Keys install failed"), | ||
4368 | tr("Decryption Keys failed to initialize. Check that your dumping tools are " | ||
4369 | "up to date and re-dump keys.")); | ||
4370 | } | ||
4371 | |||
4372 | OnCheckFirmwareDecryption(); | ||
4373 | } | ||
4374 | |||
4298 | void GMainWindow::OnAbout() { | 4375 | void GMainWindow::OnAbout() { |
4299 | AboutDialog aboutDialog(this); | 4376 | AboutDialog aboutDialog(this); |
4300 | aboutDialog.exec(); | 4377 | aboutDialog.exec(); |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 8510f0035..697c38e57 100755 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
@@ -381,6 +381,7 @@ private slots: | |||
381 | void OnOpenYuzuFolder(); | 381 | void OnOpenYuzuFolder(); |
382 | void OnVerifyInstalledContents(); | 382 | void OnVerifyInstalledContents(); |
383 | void OnInstallFirmware(); | 383 | void OnInstallFirmware(); |
384 | void OnInstallDecryptionKeys(); | ||
384 | void OnAbout(); | 385 | void OnAbout(); |
385 | void OnToggleFilterBar(); | 386 | void OnToggleFilterBar(); |
386 | void OnToggleStatusBar(); | 387 | void OnToggleStatusBar(); |
diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index 656c3e8ef..0387bb710 100755 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui | |||
@@ -165,8 +165,9 @@ | |||
165 | <addaction name="separator"/> | 165 | <addaction name="separator"/> |
166 | <addaction name="action_Configure_Tas"/> | 166 | <addaction name="action_Configure_Tas"/> |
167 | </widget> | 167 | </widget> |
168 | <addaction name="action_Verify_installed_contents"/> | 168 | <addaction name="action_Install_Keys"/> |
169 | <addaction name="action_Install_Firmware"/> | 169 | <addaction name="action_Install_Firmware"/> |
170 | <addaction name="action_Verify_installed_contents"/> | ||
170 | <addaction name="separator"/> | 171 | <addaction name="separator"/> |
171 | <addaction name="menu_cabinet_applet"/> | 172 | <addaction name="menu_cabinet_applet"/> |
172 | <addaction name="action_Load_Album"/> | 173 | <addaction name="action_Load_Album"/> |
@@ -469,6 +470,11 @@ | |||
469 | <string>Install Firmware</string> | 470 | <string>Install Firmware</string> |
470 | </property> | 471 | </property> |
471 | </action> | 472 | </action> |
473 | <action name="action_Install_Keys"> | ||
474 | <property name="text"> | ||
475 | <string>Install Decryption Keys</string> | ||
476 | </property> | ||
477 | </action> | ||
472 | </widget> | 478 | </widget> |
473 | <resources> | 479 | <resources> |
474 | <include location="yuzu.qrc"/> | 480 | <include location="yuzu.qrc"/> |