From 17ca73993503428c493038179c3bd98fc7dc7411 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 18 Sep 2024 19:28:39 +0200 Subject: [PATCH 1/3] [3PP] Reverted Catch2 back to 2.x version due to incompatibility --- third_party/catch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/catch b/third_party/catch index 18df97df00..ee1450f268 160000 --- a/third_party/catch +++ b/third_party/catch @@ -1 +1 @@ -Subproject commit 18df97df00848e91bfe1b63408bba19f8b8237ae +Subproject commit ee1450f268dfd5c13aa8670ba97e93cabaf2e15d From 5abf67f540357a6e2c16e9db2a14719e041f21f1 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 18 Sep 2024 19:30:06 +0200 Subject: [PATCH 2/3] [MISC] Added devkit directory to gitignore file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8e4aedea26..bfc97737a5 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,5 @@ node_modules/.bin/ /cache /cache1 /cache0 +/devkit recent.toml From 2709a5d3e8f780973639df23f240b146bdb4c9fb Mon Sep 17 00:00:00 2001 From: Gliniak Date: Thu, 19 Sep 2024 22:08:42 +0200 Subject: [PATCH 3/3] [Emulator] Improvements to EmulatorWindow::RunTitle - Use reference instead of copy for provided path - Extended error logging for special cases --- src/xenia/app/emulator_window.cc | 26 +++++++++++++++++++------- src/xenia/app/emulator_window.h | 2 +- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index 22c0fc7022..d5b8619858 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -1902,15 +1902,27 @@ std::string EmulatorWindow::CanonicalizeFileExtension( return xe::utf8::lower_ascii(xe::path_to_utf8(path.extension())); } -xe::X_STATUS EmulatorWindow::RunTitle(std::filesystem::path path_to_file) { - bool titleExists = !std::filesystem::exists(path_to_file); +xe::X_STATUS EmulatorWindow::RunTitle( + const std::filesystem::path& path_to_file) { + std::error_code ec = {}; + bool titleExists = std::filesystem::exists(path_to_file, ec); + + if (path_to_file.empty() || !titleExists) { + std::string log_msg = + fmt::format("Failed to launch title path is {}.", + path_to_file.empty() ? "empty" : "invalid"); + + if (!path_to_file.empty() && !titleExists) { + log_msg.append( + fmt::format("\nProvided Path: {}", xe::path_to_utf8(path_to_file))); + } - if (path_to_file.empty() || titleExists) { - char* log_msg = path_to_file.empty() - ? "Failed to launch title path is empty." - : "Failed to launch title path is invalid."; + if (ec) { + log_msg.append(fmt::format("\nExtended message info: {} ({:08X})", + ec.message(), ec.value())); + } - XELOGE(log_msg); + XELOGE("{}", log_msg); imgui_drawer_.get()->ClearDialogs(); diff --git a/src/xenia/app/emulator_window.h b/src/xenia/app/emulator_window.h index 79c8aea3aa..86bae14cab 100644 --- a/src/xenia/app/emulator_window.h +++ b/src/xenia/app/emulator_window.h @@ -82,7 +82,7 @@ class EmulatorWindow { void OnEmulatorInitialized(); - xe::X_STATUS RunTitle(std::filesystem::path path_to_file); + xe::X_STATUS RunTitle(const std::filesystem::path& path_to_file); void UpdateTitle(); void SetFullscreen(bool fullscreen); void ToggleFullscreen();