diff options
| author | 2019-06-05 15:57:48 -0400 | |
|---|---|---|
| committer | 2019-06-05 15:57:48 -0400 | |
| commit | 799302bc9d6edade951cf7746314d96d440c823c (patch) | |
| tree | 0fd074d6ab32ef2b2590bdd0c21302784976d653 /src | |
| parent | Merge pull request #2545 from lioncash/timing (diff) | |
| parent | core/core: Remove unnecessary includes (diff) | |
| download | yuzu-799302bc9d6edade951cf7746314d96d440c823c.tar.gz yuzu-799302bc9d6edade951cf7746314d96d440c823c.tar.xz yuzu-799302bc9d6edade951cf7746314d96d440c823c.zip | |
Merge pull request #2526 from lioncash/global
core/telemetry_session: Remove usages of the global system accessor
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 19 | ||||
| -rw-r--r-- | src/core/core.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applets.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applets.h | 27 | ||||
| -rw-r--r-- | src/core/loader/loader.h | 11 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 59 | ||||
| -rw-r--r-- | src/core/telemetry_session.h | 31 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 5 |
9 files changed, 98 insertions, 75 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 7106151bd..ff0721079 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -18,11 +18,6 @@ | |||
| 18 | #include "core/file_sys/registered_cache.h" | 18 | #include "core/file_sys/registered_cache.h" |
| 19 | #include "core/file_sys/vfs_concat.h" | 19 | #include "core/file_sys/vfs_concat.h" |
| 20 | #include "core/file_sys/vfs_real.h" | 20 | #include "core/file_sys/vfs_real.h" |
| 21 | #include "core/frontend/applets/error.h" | ||
| 22 | #include "core/frontend/applets/general_frontend.h" | ||
| 23 | #include "core/frontend/applets/profile_select.h" | ||
| 24 | #include "core/frontend/applets/software_keyboard.h" | ||
| 25 | #include "core/frontend/applets/web_browser.h" | ||
| 26 | #include "core/gdbstub/gdbstub.h" | 21 | #include "core/gdbstub/gdbstub.h" |
| 27 | #include "core/hle/kernel/client_port.h" | 22 | #include "core/hle/kernel/client_port.h" |
| 28 | #include "core/hle/kernel/kernel.h" | 23 | #include "core/hle/kernel/kernel.h" |
| @@ -37,9 +32,6 @@ | |||
| 37 | #include "core/settings.h" | 32 | #include "core/settings.h" |
| 38 | #include "core/telemetry_session.h" | 33 | #include "core/telemetry_session.h" |
| 39 | #include "file_sys/cheat_engine.h" | 34 | #include "file_sys/cheat_engine.h" |
| 40 | #include "frontend/applets/profile_select.h" | ||
| 41 | #include "frontend/applets/software_keyboard.h" | ||
| 42 | #include "frontend/applets/web_browser.h" | ||
| 43 | #include "video_core/debug_utils/debug_utils.h" | 35 | #include "video_core/debug_utils/debug_utils.h" |
| 44 | #include "video_core/renderer_base.h" | 36 | #include "video_core/renderer_base.h" |
| 45 | #include "video_core/video_core.h" | 37 | #include "video_core/video_core.h" |
| @@ -144,20 +136,10 @@ struct System::Impl { | |||
| 144 | ResultStatus Load(System& system, Frontend::EmuWindow& emu_window, | 136 | ResultStatus Load(System& system, Frontend::EmuWindow& emu_window, |
| 145 | const std::string& filepath) { | 137 | const std::string& filepath) { |
| 146 | app_loader = Loader::GetLoader(GetGameFileFromPath(virtual_filesystem, filepath)); | 138 | app_loader = Loader::GetLoader(GetGameFileFromPath(virtual_filesystem, filepath)); |
| 147 | |||
| 148 | if (!app_loader) { | 139 | if (!app_loader) { |
| 149 | LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); | 140 | LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); |
| 150 | return ResultStatus::ErrorGetLoader; | 141 | return ResultStatus::ErrorGetLoader; |
| 151 | } | 142 | } |
| 152 | std::pair<std::optional<u32>, Loader::ResultStatus> system_mode = | ||
| 153 | app_loader->LoadKernelSystemMode(); | ||
| 154 | |||
| 155 | if (system_mode.second != Loader::ResultStatus::Success) { | ||
| 156 | LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", | ||
| 157 | static_cast<int>(system_mode.second)); | ||
| 158 | |||
| 159 | return ResultStatus::ErrorSystemMode; | ||
| 160 | } | ||
| 161 | 143 | ||
| 162 | ResultStatus init_result{Init(system, emu_window)}; | 144 | ResultStatus init_result{Init(system, emu_window)}; |
| 163 | if (init_result != ResultStatus::Success) { | 145 | if (init_result != ResultStatus::Success) { |
| @@ -167,6 +149,7 @@ struct System::Impl { | |||
| 167 | return init_result; | 149 | return init_result; |
| 168 | } | 150 | } |
| 169 | 151 | ||
| 152 | telemetry_session->AddInitialInfo(*app_loader); | ||
| 170 | auto main_process = Kernel::Process::Create(system, "main"); | 153 | auto main_process = Kernel::Process::Create(system, "main"); |
| 171 | const auto [load_result, load_parameters] = app_loader->Load(*main_process); | 154 | const auto [load_result, load_parameters] = app_loader->Load(*main_process); |
| 172 | if (load_result != Loader::ResultStatus::Success) { | 155 | if (load_result != Loader::ResultStatus::Success) { |
diff --git a/src/core/core.h b/src/core/core.h index a9a756a4c..20959de54 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -98,7 +98,6 @@ public: | |||
| 98 | Success, ///< Succeeded | 98 | Success, ///< Succeeded |
| 99 | ErrorNotInitialized, ///< Error trying to use core prior to initialization | 99 | ErrorNotInitialized, ///< Error trying to use core prior to initialization |
| 100 | ErrorGetLoader, ///< Error finding the correct application loader | 100 | ErrorGetLoader, ///< Error finding the correct application loader |
| 101 | ErrorSystemMode, ///< Error determining the system mode | ||
| 102 | ErrorSystemFiles, ///< Error in finding system files | 101 | ErrorSystemFiles, ///< Error in finding system files |
| 103 | ErrorSharedFont, ///< Error in finding shared font | 102 | ErrorSharedFont, ///< Error in finding shared font |
| 104 | ErrorVideoCore, ///< Error in the video core | 103 | ErrorVideoCore, ///< Error in the video core |
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index e812c66e9..14fa92318 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp | |||
| @@ -121,6 +121,21 @@ void Applet::Initialize() { | |||
| 121 | initialized = true; | 121 | initialized = true; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | AppletFrontendSet::AppletFrontendSet() = default; | ||
| 125 | |||
| 126 | AppletFrontendSet::AppletFrontendSet(ErrorApplet error, PhotoViewer photo_viewer, | ||
| 127 | ProfileSelect profile_select, | ||
| 128 | SoftwareKeyboard software_keyboard, WebBrowser web_browser) | ||
| 129 | : error{std::move(error)}, photo_viewer{std::move(photo_viewer)}, profile_select{std::move( | ||
| 130 | profile_select)}, | ||
| 131 | software_keyboard{std::move(software_keyboard)}, web_browser{std::move(web_browser)} {} | ||
| 132 | |||
| 133 | AppletFrontendSet::~AppletFrontendSet() = default; | ||
| 134 | |||
| 135 | AppletFrontendSet::AppletFrontendSet(AppletFrontendSet&&) noexcept = default; | ||
| 136 | |||
| 137 | AppletFrontendSet& AppletFrontendSet::operator=(AppletFrontendSet&&) noexcept = default; | ||
| 138 | |||
| 124 | AppletManager::AppletManager() = default; | 139 | AppletManager::AppletManager() = default; |
| 125 | 140 | ||
| 126 | AppletManager::~AppletManager() = default; | 141 | AppletManager::~AppletManager() = default; |
diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h index 7f932672c..b46e10a4a 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/applets/applets.h | |||
| @@ -137,11 +137,28 @@ protected: | |||
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | struct AppletFrontendSet { | 139 | struct AppletFrontendSet { |
| 140 | std::unique_ptr<Core::Frontend::ErrorApplet> error; | 140 | using ErrorApplet = std::unique_ptr<Core::Frontend::ErrorApplet>; |
| 141 | std::unique_ptr<Core::Frontend::PhotoViewerApplet> photo_viewer; | 141 | using PhotoViewer = std::unique_ptr<Core::Frontend::PhotoViewerApplet>; |
| 142 | std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_select; | 142 | using ProfileSelect = std::unique_ptr<Core::Frontend::ProfileSelectApplet>; |
| 143 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; | 143 | using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>; |
| 144 | std::unique_ptr<Core::Frontend::WebBrowserApplet> web_browser; | 144 | using WebBrowser = std::unique_ptr<Core::Frontend::WebBrowserApplet>; |
| 145 | |||
| 146 | AppletFrontendSet(); | ||
| 147 | AppletFrontendSet(ErrorApplet error, PhotoViewer photo_viewer, ProfileSelect profile_select, | ||
| 148 | SoftwareKeyboard software_keyboard, WebBrowser web_browser); | ||
| 149 | ~AppletFrontendSet(); | ||
| 150 | |||
| 151 | AppletFrontendSet(const AppletFrontendSet&) = delete; | ||
| 152 | AppletFrontendSet& operator=(const AppletFrontendSet&) = delete; | ||
| 153 | |||
| 154 | AppletFrontendSet(AppletFrontendSet&&) noexcept; | ||
| 155 | AppletFrontendSet& operator=(AppletFrontendSet&&) noexcept; | ||
| 156 | |||
| 157 | ErrorApplet error; | ||
| 158 | PhotoViewer photo_viewer; | ||
| 159 | ProfileSelect profile_select; | ||
| 160 | SoftwareKeyboard software_keyboard; | ||
| 161 | WebBrowser web_browser; | ||
| 145 | }; | 162 | }; |
| 146 | 163 | ||
| 147 | class AppletManager { | 164 | class AppletManager { |
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index f7846db52..869406b75 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h | |||
| @@ -154,17 +154,6 @@ public: | |||
| 154 | virtual LoadResult Load(Kernel::Process& process) = 0; | 154 | virtual LoadResult Load(Kernel::Process& process) = 0; |
| 155 | 155 | ||
| 156 | /** | 156 | /** |
| 157 | * Loads the system mode that this application needs. | ||
| 158 | * This function defaults to 2 (96MB allocated to the application) if it can't read the | ||
| 159 | * information. | ||
| 160 | * @returns A pair with the optional system mode, and and the status. | ||
| 161 | */ | ||
| 162 | virtual std::pair<std::optional<u32>, ResultStatus> LoadKernelSystemMode() { | ||
| 163 | // 96MB allocated to the application. | ||
| 164 | return std::make_pair(2, ResultStatus::Success); | ||
| 165 | } | ||
| 166 | |||
| 167 | /** | ||
| 168 | * Get the code (typically .code section) of the application | 157 | * Get the code (typically .code section) of the application |
| 169 | * @param buffer Reference to buffer to store data | 158 | * @param buffer Reference to buffer to store data |
| 170 | * @return ResultStatus result of function | 159 | * @return ResultStatus result of function |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 4b17bada5..90d06830f 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include "common/file_util.h" | 12 | #include "common/file_util.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | 14 | ||
| 15 | #include "core/core.h" | ||
| 16 | #include "core/file_sys/control_metadata.h" | 15 | #include "core/file_sys/control_metadata.h" |
| 17 | #include "core/file_sys/patch_manager.h" | 16 | #include "core/file_sys/patch_manager.h" |
| 18 | #include "core/loader/loader.h" | 17 | #include "core/loader/loader.h" |
| @@ -101,7 +100,30 @@ bool VerifyLogin(const std::string& username, const std::string& token) { | |||
| 101 | #endif | 100 | #endif |
| 102 | } | 101 | } |
| 103 | 102 | ||
| 104 | TelemetrySession::TelemetrySession() { | 103 | TelemetrySession::TelemetrySession() = default; |
| 104 | |||
| 105 | TelemetrySession::~TelemetrySession() { | ||
| 106 | // Log one-time session end information | ||
| 107 | const s64 shutdown_time{std::chrono::duration_cast<std::chrono::milliseconds>( | ||
| 108 | std::chrono::system_clock::now().time_since_epoch()) | ||
| 109 | .count()}; | ||
| 110 | AddField(Telemetry::FieldType::Session, "Shutdown_Time", shutdown_time); | ||
| 111 | |||
| 112 | #ifdef ENABLE_WEB_SERVICE | ||
| 113 | auto backend = std::make_unique<WebService::TelemetryJson>( | ||
| 114 | Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token); | ||
| 115 | #else | ||
| 116 | auto backend = std::make_unique<Telemetry::NullVisitor>(); | ||
| 117 | #endif | ||
| 118 | |||
| 119 | // Complete the session, submitting to the web service backend if necessary | ||
| 120 | field_collection.Accept(*backend); | ||
| 121 | if (Settings::values.enable_telemetry) { | ||
| 122 | backend->Complete(); | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { | ||
| 105 | // Log one-time top-level information | 127 | // Log one-time top-level information |
| 106 | AddField(Telemetry::FieldType::None, "TelemetryId", GetTelemetryId()); | 128 | AddField(Telemetry::FieldType::None, "TelemetryId", GetTelemetryId()); |
| 107 | 129 | ||
| @@ -112,26 +134,28 @@ TelemetrySession::TelemetrySession() { | |||
| 112 | AddField(Telemetry::FieldType::Session, "Init_Time", init_time); | 134 | AddField(Telemetry::FieldType::Session, "Init_Time", init_time); |
| 113 | 135 | ||
| 114 | u64 program_id{}; | 136 | u64 program_id{}; |
| 115 | const Loader::ResultStatus res{System::GetInstance().GetAppLoader().ReadProgramId(program_id)}; | 137 | const Loader::ResultStatus res{app_loader.ReadProgramId(program_id)}; |
| 116 | if (res == Loader::ResultStatus::Success) { | 138 | if (res == Loader::ResultStatus::Success) { |
| 117 | const std::string formatted_program_id{fmt::format("{:016X}", program_id)}; | 139 | const std::string formatted_program_id{fmt::format("{:016X}", program_id)}; |
| 118 | AddField(Telemetry::FieldType::Session, "ProgramId", formatted_program_id); | 140 | AddField(Telemetry::FieldType::Session, "ProgramId", formatted_program_id); |
| 119 | 141 | ||
| 120 | std::string name; | 142 | std::string name; |
| 121 | System::GetInstance().GetAppLoader().ReadTitle(name); | 143 | app_loader.ReadTitle(name); |
| 122 | 144 | ||
| 123 | if (name.empty()) { | 145 | if (name.empty()) { |
| 124 | auto [nacp, icon_file] = FileSys::PatchManager(program_id).GetControlMetadata(); | 146 | auto [nacp, icon_file] = FileSys::PatchManager(program_id).GetControlMetadata(); |
| 125 | if (nacp != nullptr) | 147 | if (nacp != nullptr) { |
| 126 | name = nacp->GetApplicationName(); | 148 | name = nacp->GetApplicationName(); |
| 149 | } | ||
| 127 | } | 150 | } |
| 128 | 151 | ||
| 129 | if (!name.empty()) | 152 | if (!name.empty()) { |
| 130 | AddField(Telemetry::FieldType::Session, "ProgramName", name); | 153 | AddField(Telemetry::FieldType::Session, "ProgramName", name); |
| 154 | } | ||
| 131 | } | 155 | } |
| 132 | 156 | ||
| 133 | AddField(Telemetry::FieldType::Session, "ProgramFormat", | 157 | AddField(Telemetry::FieldType::Session, "ProgramFormat", |
| 134 | static_cast<u8>(System::GetInstance().GetAppLoader().GetFileType())); | 158 | static_cast<u8>(app_loader.GetFileType())); |
| 135 | 159 | ||
| 136 | // Log application information | 160 | // Log application information |
| 137 | Telemetry::AppendBuildInfo(field_collection); | 161 | Telemetry::AppendBuildInfo(field_collection); |
| @@ -162,27 +186,6 @@ TelemetrySession::TelemetrySession() { | |||
| 162 | Settings::values.use_docked_mode); | 186 | Settings::values.use_docked_mode); |
| 163 | } | 187 | } |
| 164 | 188 | ||
| 165 | TelemetrySession::~TelemetrySession() { | ||
| 166 | // Log one-time session end information | ||
| 167 | const s64 shutdown_time{std::chrono::duration_cast<std::chrono::milliseconds>( | ||
| 168 | std::chrono::system_clock::now().time_since_epoch()) | ||
| 169 | .count()}; | ||
| 170 | AddField(Telemetry::FieldType::Session, "Shutdown_Time", shutdown_time); | ||
| 171 | |||
| 172 | #ifdef ENABLE_WEB_SERVICE | ||
| 173 | auto backend = std::make_unique<WebService::TelemetryJson>( | ||
| 174 | Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token); | ||
| 175 | #else | ||
| 176 | auto backend = std::make_unique<Telemetry::NullVisitor>(); | ||
| 177 | #endif | ||
| 178 | |||
| 179 | // Complete the session, submitting to web service if necessary | ||
| 180 | field_collection.Accept(*backend); | ||
| 181 | if (Settings::values.enable_telemetry) | ||
| 182 | backend->Complete(); | ||
| 183 | backend = nullptr; | ||
| 184 | } | ||
| 185 | |||
| 186 | bool TelemetrySession::SubmitTestcase() { | 189 | bool TelemetrySession::SubmitTestcase() { |
| 187 | #ifdef ENABLE_WEB_SERVICE | 190 | #ifdef ENABLE_WEB_SERVICE |
| 188 | auto backend = std::make_unique<WebService::TelemetryJson>( | 191 | auto backend = std::make_unique<WebService::TelemetryJson>( |
diff --git a/src/core/telemetry_session.h b/src/core/telemetry_session.h index cae5a45a0..17ac22377 100644 --- a/src/core/telemetry_session.h +++ b/src/core/telemetry_session.h | |||
| @@ -4,10 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | ||
| 8 | #include <string> | 7 | #include <string> |
| 9 | #include "common/telemetry.h" | 8 | #include "common/telemetry.h" |
| 10 | 9 | ||
| 10 | namespace Loader { | ||
| 11 | class AppLoader; | ||
| 12 | } | ||
| 13 | |||
| 11 | namespace Core { | 14 | namespace Core { |
| 12 | 15 | ||
| 13 | /** | 16 | /** |
| @@ -15,11 +18,33 @@ namespace Core { | |||
| 15 | * session, logging any one-time fields. Interfaces with the telemetry backend used for submitting | 18 | * session, logging any one-time fields. Interfaces with the telemetry backend used for submitting |
| 16 | * data to the web service. Submits session data on close. | 19 | * data to the web service. Submits session data on close. |
| 17 | */ | 20 | */ |
| 18 | class TelemetrySession : NonCopyable { | 21 | class TelemetrySession { |
| 19 | public: | 22 | public: |
| 20 | TelemetrySession(); | 23 | explicit TelemetrySession(); |
| 21 | ~TelemetrySession(); | 24 | ~TelemetrySession(); |
| 22 | 25 | ||
| 26 | TelemetrySession(const TelemetrySession&) = delete; | ||
| 27 | TelemetrySession& operator=(const TelemetrySession&) = delete; | ||
| 28 | |||
| 29 | TelemetrySession(TelemetrySession&&) = delete; | ||
| 30 | TelemetrySession& operator=(TelemetrySession&&) = delete; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Adds the initial telemetry info necessary when starting up a title. | ||
| 34 | * | ||
| 35 | * This includes information such as: | ||
| 36 | * - Telemetry ID | ||
| 37 | * - Initialization time | ||
| 38 | * - Title ID | ||
| 39 | * - Title name | ||
| 40 | * - Title file format | ||
| 41 | * - Miscellaneous settings values. | ||
| 42 | * | ||
| 43 | * @param app_loader The application loader to use to retrieve | ||
| 44 | * title-specific information. | ||
| 45 | */ | ||
| 46 | void AddInitialInfo(Loader::AppLoader& app_loader); | ||
| 47 | |||
| 23 | /** | 48 | /** |
| 24 | * Wrapper around the Telemetry::FieldCollection::AddField method. | 49 | * Wrapper around the Telemetry::FieldCollection::AddField method. |
| 25 | * @param type Type of the field to add. | 50 | * @param type Type of the field to add. |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c6526f855..36d2f2418 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -847,11 +847,6 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 847 | QMessageBox::critical(this, tr("Error while loading ROM!"), | 847 | QMessageBox::critical(this, tr("Error while loading ROM!"), |
| 848 | tr("The ROM format is not supported.")); | 848 | tr("The ROM format is not supported.")); |
| 849 | break; | 849 | break; |
| 850 | case Core::System::ResultStatus::ErrorSystemMode: | ||
| 851 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); | ||
| 852 | QMessageBox::critical(this, tr("Error while loading ROM!"), | ||
| 853 | tr("Could not determine the system mode.")); | ||
| 854 | break; | ||
| 855 | case Core::System::ResultStatus::ErrorVideoCore: | 850 | case Core::System::ResultStatus::ErrorVideoCore: |
| 856 | QMessageBox::critical( | 851 | QMessageBox::critical( |
| 857 | this, tr("An error occurred initializing the video core."), | 852 | this, tr("An error occurred initializing the video core."), |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 5d9442646..129d8ca73 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -192,7 +192,7 @@ int main(int argc, char** argv) { | |||
| 192 | 192 | ||
| 193 | switch (load_result) { | 193 | switch (load_result) { |
| 194 | case Core::System::ResultStatus::ErrorGetLoader: | 194 | case Core::System::ResultStatus::ErrorGetLoader: |
| 195 | LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); | 195 | LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath); |
| 196 | return -1; | 196 | return -1; |
| 197 | case Core::System::ResultStatus::ErrorLoader: | 197 | case Core::System::ResultStatus::ErrorLoader: |
| 198 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); | 198 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); |
| @@ -200,9 +200,6 @@ int main(int argc, char** argv) { | |||
| 200 | case Core::System::ResultStatus::ErrorNotInitialized: | 200 | case Core::System::ResultStatus::ErrorNotInitialized: |
| 201 | LOG_CRITICAL(Frontend, "CPUCore not initialized"); | 201 | LOG_CRITICAL(Frontend, "CPUCore not initialized"); |
| 202 | return -1; | 202 | return -1; |
| 203 | case Core::System::ResultStatus::ErrorSystemMode: | ||
| 204 | LOG_CRITICAL(Frontend, "Failed to determine system mode!"); | ||
| 205 | return -1; | ||
| 206 | case Core::System::ResultStatus::ErrorVideoCore: | 203 | case Core::System::ResultStatus::ErrorVideoCore: |
| 207 | LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!"); | 204 | LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!"); |
| 208 | return -1; | 205 | return -1; |