From 8e3190a506fef4faa5d4c461692b0256e8dbb2e2 Mon Sep 17 00:00:00 2001 From: Crimson Hawk Date: Thu, 7 Mar 2024 03:01:08 +0000 Subject: [PATCH 1/3] Revert "Merge branch 'disable-web-services' into 'dev'" This reverts merge request !37 --- src/common/settings.h | 2 +- src/yuzu/configuration/configure_web.ui | 3 --- src/yuzu/main.cpp | 3 +++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/settings.h b/src/common/settings.h index a0f6cdb570..61969af2bf 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -609,7 +609,7 @@ struct Values { Category::Network}; // WebService - Setting enable_telemetry{linkage, false, "enable_telemetry", Category::WebService}; + Setting enable_telemetry{linkage, true, "enable_telemetry", Category::WebService}; Setting web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url", Category::WebService}; Setting yuzu_username{linkage, std::string(), "yuzu_username", diff --git a/src/yuzu/configuration/configure_web.ui b/src/yuzu/configuration/configure_web.ui index cfe6460520..3ac3864bea 100644 --- a/src/yuzu/configuration/configure_web.ui +++ b/src/yuzu/configuration/configure_web.ui @@ -2,9 +2,6 @@ ConfigureWeb - - false - 0 diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 98f4ca42b1..da235bb97a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -429,6 +429,9 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk game_list->LoadCompatibilityList(); game_list->PopulateAsync(UISettings::values.game_dirs); + // Show one-time "callout" messages to the user + ShowTelemetryCallout(); + // make sure menubar has the arrow cursor instead of inheriting from this ui->menubar->setCursor(QCursor()); statusBar()->setCursor(QCursor()); From e19072e26ed6b9896f6a66c3b1a01ad663f81406 Mon Sep 17 00:00:00 2001 From: Crimson Hawk Date: Thu, 7 Mar 2024 03:04:42 +0000 Subject: [PATCH 2/3] Revert "Merge branch 'palfaiate-dev-patch-24781' into 'dev'" This reverts merge request !62 --- src/core/crypto/key_manager.cpp | 48 +++++---------------------------- src/core/crypto/key_manager.h | 4 +-- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index a268211fd6..c6215c8aad 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -372,7 +372,7 @@ Key128 DeriveKeyblobMACKey(const Key128& keyblob_key, const Key128& mac_source) std::optional DeriveSDSeed() { const auto system_save_43_path = - Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000043"; + Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000043"; const Common::FS::IOFile save_43{system_save_43_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -381,7 +381,7 @@ std::optional DeriveSDSeed() { } const auto sd_private_path = - Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "Nintendo/Contents/private"; + Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/private"; const Common::FS::IOFile sd_private{sd_private_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -640,7 +640,7 @@ KeyManager::KeyManager() { void KeyManager::ReloadKeys() { // Initialize keys - const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); if (!Common::FS::CreateDir(yuzu_keys_dir)) { LOG_ERROR(Core, "Failed to create the keys directory."); @@ -648,17 +648,13 @@ void KeyManager::ReloadKeys() { if (Settings::values.use_dev_keys) { dev_mode = true; - LoadFromFile(yuzu_keys_dir / "dev.keys_autogenerated", false); LoadFromFile(yuzu_keys_dir / "dev.keys", false); } else { dev_mode = false; - LoadFromFile(yuzu_keys_dir / "prod.keys_autogenerated", false); LoadFromFile(yuzu_keys_dir / "prod.keys", false); } - LoadFromFile(yuzu_keys_dir / "title.keys_autogenerated", true); LoadFromFile(yuzu_keys_dir / "title.keys", true); - LoadFromFile(yuzu_keys_dir / "console.keys_autogenerated", false); LoadFromFile(yuzu_keys_dir / "console.keys", false); } @@ -844,8 +840,6 @@ Key256 KeyManager::GetBISKey(u8 partition_id) const { return out; } -template - void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) { if (s128_keys.find({id, field1, field2}) != s128_keys.end() || key == Key128{}) { return; @@ -856,29 +850,6 @@ void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) { std::memcpy(rights_id.data() + sizeof(u64), &field1, sizeof(u64)); } - auto category = KeyCategory::Standard; - if (id == S128KeyType::Keyblob || id == S128KeyType::KeyblobMAC || id == S128KeyType::TSEC || - id == S128KeyType::SecureBoot || id == S128KeyType::SDSeed || id == S128KeyType::BIS) { - category = KeyCategory::Console; - } - - const auto iter2 = std::find_if( - s128_file_id.begin(), s128_file_id.end(), [&id, &field1, &field2](const auto& elem) { - return std::tie(elem.second.type, elem.second.field1, elem.second.field2) == - std::tie(id, field1, field2); - }); - if (iter2 != s128_file_id.end()) { - } - - // Variable cases - if (id == S128KeyType::KeyArea) { - static constexpr std::array kak_names = { - "key_area_key_application_{:02X}", - "key_area_key_ocean_{:02X}", - "key_area_key_system_{:02X}", - }; - } - s128_keys[{id, field1, field2}] = key; } @@ -886,16 +857,11 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) { if (s256_keys.find({id, field1, field2}) != s256_keys.end() || key == Key256{}) { return; } - const auto iter = std::find_if( - s256_file_id.begin(), s256_file_id.end(), [&id, &field1, &field2](const auto& elem) { - return std::tie(elem.second.type, elem.second.field1, elem.second.field2) == - std::tie(id, field1, field2); - }); s256_keys[{id, field1, field2}] = key; } bool KeyManager::KeyFileExists(bool title) { - const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); if (title) { return Common::FS::Exists(yuzu_keys_dir / "title.keys"); @@ -1142,7 +1108,7 @@ void KeyManager::PopulateTickets() { std::vector tickets; const auto system_save_e1_path = - Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e1"; + Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e1"; if (Common::FS::Exists(system_save_e1_path)) { const Common::FS::IOFile save_e1{system_save_e1_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -1151,7 +1117,7 @@ void KeyManager::PopulateTickets() { } const auto system_save_e2_path = - Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e2"; + Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e2"; if (Common::FS::Exists(system_save_e2_path)) { const Common::FS::IOFile save_e2{system_save_e2_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h index a1a7cb0e86..005062345e 100644 --- a/src/core/crypto/key_manager.h +++ b/src/core/crypto/key_manager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -314,8 +314,6 @@ private: bool dev_mode; void LoadFromFile(const std::filesystem::path& file_path, bool is_title_keys); - template - void DeriveGeneralPurposeKeys(std::size_t crypto_revision); void DeriveETicketRSAKey(); From cdd4ec76637e78fa700f86b7ae346e396a4cc8c7 Mon Sep 17 00:00:00 2001 From: Crimson Hawk Date: Thu, 7 Mar 2024 03:09:23 +0000 Subject: [PATCH 3/3] Revert "Merge branch 'revert-ee5b0a92' into 'dev'" This reverts merge request !64 --- src/common/settings.h | 2 +- src/yuzu/configuration/configure_web.ui | 3 +++ src/yuzu/main.cpp | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/settings.h b/src/common/settings.h index 61969af2bf..a0f6cdb570 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -609,7 +609,7 @@ struct Values { Category::Network}; // WebService - Setting enable_telemetry{linkage, true, "enable_telemetry", Category::WebService}; + Setting enable_telemetry{linkage, false, "enable_telemetry", Category::WebService}; Setting web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url", Category::WebService}; Setting yuzu_username{linkage, std::string(), "yuzu_username", diff --git a/src/yuzu/configuration/configure_web.ui b/src/yuzu/configuration/configure_web.ui index 3ac3864bea..cfe6460520 100644 --- a/src/yuzu/configuration/configure_web.ui +++ b/src/yuzu/configuration/configure_web.ui @@ -2,6 +2,9 @@ ConfigureWeb + + false + 0 diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index da235bb97a..98f4ca42b1 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -429,9 +429,6 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk game_list->LoadCompatibilityList(); game_list->PopulateAsync(UISettings::values.game_dirs); - // Show one-time "callout" messages to the user - ShowTelemetryCallout(); - // make sure menubar has the arrow cursor instead of inheriting from this ui->menubar->setCursor(QCursor()); statusBar()->setCursor(QCursor());