diff options
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index b5392c499..9095cf27d 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -7,6 +7,8 @@ #include <string> #include <thread> +#include <fmt/ostream.h> + #include "common/common_paths.h" #include "common/logging/backend.h" #include "common/logging/filter.h" @@ -23,6 +25,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 +74,7 @@ static void InitializeLogging() { /// Application entry point int main(int argc, char** argv) { Config config; + int option_index = 0; bool use_gdbstub = Settings::values.use_gdbstub; u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port); @@ -159,10 +163,11 @@ int main(int argc, char** argv) { } Core::System& system{Core::System::GetInstance()}; + system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>()); SCOPE_EXIT({ system.Shutdown(); }); - const Core::System::ResultStatus load_result{system.Load(emu_window.get(), filepath)}; + const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)}; switch (load_result) { case Core::System::ResultStatus::ErrorGetLoader: @@ -171,15 +176,6 @@ 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/"); - return -1; - case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: - LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); - return -1; case Core::System::ResultStatus::ErrorNotInitialized: LOG_CRITICAL(Frontend, "CPUCore not initialized"); return -1; @@ -187,10 +183,21 @@ int main(int argc, char** argv) { LOG_CRITICAL(Frontend, "Failed to determine system mode!"); return -1; case Core::System::ResultStatus::ErrorVideoCore: - LOG_CRITICAL(Frontend, "VideoCore not initialized"); + LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!"); return -1; case Core::System::ResultStatus::Success: break; // Expected case + default: + if (static_cast<u32>(load_result) > + static_cast<u32>(Core::System::ResultStatus::ErrorLoader)) { + const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader); + const u16 error_id = static_cast<u16>(load_result) - loader_id; + LOG_CRITICAL(Frontend, + "While attempting to load the ROM requested, an error occured. Please " + "refer to the yuzu wiki for more information or the yuzu discord for " + "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", + loader_id, error_id, static_cast<Loader::ResultStatus>(error_id)); + } } Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); |