diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-07-28 05:55:23 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-01 06:16:54 +0200 |
commit | df5b75694f5abde94ccf05fa6c7a557b1ba9079b (patch) | |
tree | 70f0cf96b1a9834360fb1c5d5547939693ecd577 /src/yuzu_cmd | |
parent | Merge pull request #871 from bunnei/audio-config (diff) | |
download | yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.gz yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.bz2 yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.lz yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.xz yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.zst yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.zip |
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r-- | src/yuzu_cmd/config.cpp | 1 | ||||
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 15 |
2 files changed, 16 insertions, 0 deletions
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 <getopt.h> +#include "core/crypto/key_manager.h" #ifndef _MSC_VER #include <unistd.h> #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<u32>(Settings::values.gdbstub_port); |