From df5b75694f5abde94ccf05fa6c7a557b1ba9079b Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 27 Jul 2018 23:55:23 -0400 Subject: Remove files that are not used --- src/yuzu_cmd/config.cpp | 1 + src/yuzu_cmd/yuzu.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index c581e9699..9bf26717f 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -119,6 +119,7 @@ void Config::ReadValues() { // Miscellaneous Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); + Settings::values.use_dev_keys = sdl2_config->GetBoolean("Miscellaneous", "use_dev_keys", false); // Debugging Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index b5392c499..955e2ba14 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -23,6 +23,7 @@ #include "yuzu_cmd/emu_window/emu_window_sdl2.h" #include +#include "core/crypto/key_manager.h" #ifndef _MSC_VER #include #endif @@ -71,6 +72,20 @@ static void InitializeLogging() { /// Application entry point int main(int argc, char** argv) { Config config; + + // Initialize keys + std::string keys_dir = FileUtil::GetHactoolConfigurationPath(); + if (Settings::values.use_dev_keys) { + Crypto::keys.SetValidationMode(true); + if (FileUtil::Exists(keys_dir + DIR_SEP + "dev.keys")) + Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "dev.keys", false); + } else { + if (FileUtil::Exists(keys_dir + DIR_SEP + "prod.keys")) + Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "prod.keys", false); + } + if (FileUtil::Exists(keys_dir + DIR_SEP + "title.keys")) + Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "title.keys", true); + int option_index = 0; bool use_gdbstub = Settings::values.use_gdbstub; u32 gdb_port = static_cast(Settings::values.gdbstub_port); -- cgit v1.2.3 From 239a3113e4c6a53a2c7b12e67a0f21afae24b0aa Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sat, 28 Jul 2018 21:39:42 -0400 Subject: Make XCI comply to review and style guidelines --- src/yuzu_cmd/yuzu.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 955e2ba14..97a8e13f0 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -73,19 +73,6 @@ static void InitializeLogging() { int main(int argc, char** argv) { Config config; - // Initialize keys - std::string keys_dir = FileUtil::GetHactoolConfigurationPath(); - if (Settings::values.use_dev_keys) { - Crypto::keys.SetValidationMode(true); - if (FileUtil::Exists(keys_dir + DIR_SEP + "dev.keys")) - Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "dev.keys", false); - } else { - if (FileUtil::Exists(keys_dir + DIR_SEP + "prod.keys")) - Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "prod.keys", false); - } - if (FileUtil::Exists(keys_dir + DIR_SEP + "title.keys")) - Crypto::keys.LoadFromFile(keys_dir + DIR_SEP + "title.keys", true); - int option_index = 0; bool use_gdbstub = Settings::values.use_gdbstub; u32 gdb_port = static_cast(Settings::values.gdbstub_port); -- cgit v1.2.3 From 187d8e215fb157edaa9f3976bebba9a9a7ed103d Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 30 Jul 2018 12:46:23 -0400 Subject: Use more descriptive error codes and messages --- src/yuzu_cmd/yuzu.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 97a8e13f0..5970cdb4e 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -173,11 +173,15 @@ int main(int argc, char** argv) { case Core::System::ResultStatus::ErrorLoader: LOG_CRITICAL(Frontend, "Failed to load ROM!"); return -1; - case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: - LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " - "being used with yuzu. \n\n For more information on dumping and " - "decrypting games, please refer to: " - "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); + case Core::System::ResultStatus::ErrorLoader_ErrorMissingKeys: + LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and the keys required " + "could not be found. Please refer to for help"); + return -1; + case Core::System::ResultStatus::ErrorLoader_ErrorDecrypting: + LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and there was a " + "general error while decrypting. This could mean that the keys are " + "incorrect, game is invalid or game uses an unsupported method of " + "crypto. Please refer to to double-check your keys"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); -- cgit v1.2.3 From 0497bb5528f62f9e3db887988f0f93b4a1653a42 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 30 Jul 2018 22:04:51 -0400 Subject: Fix merge conflicts with opus and update docs --- src/yuzu_cmd/yuzu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 5970cdb4e..c3b0d9f1f 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -175,13 +175,13 @@ int main(int argc, char** argv) { return -1; case Core::System::ResultStatus::ErrorLoader_ErrorMissingKeys: LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and the keys required " - "could not be found. Please refer to for help"); + "could not be found. Please refer to the yuzu wiki for help"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorDecrypting: LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and there was a " "general error while decrypting. This could mean that the keys are " "incorrect, game is invalid or game uses an unsupported method of " - "crypto. Please refer to to double-check your keys"); + "crypto. Please double-check your keys"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); -- cgit v1.2.3