summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index ba2c993ba..67587cc54 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -146,9 +146,8 @@ int main(int argc, char** argv) {
146 return -1; 146 return -1;
147 } 147 }
148 148
149 Core::System::InitializeGlobalInstance(); 149 Core::System system{};
150 auto& system{Core::System::GetInstance()}; 150 InputCommon::InputSubsystem input_subsystem{};
151 InputCommon::InputSubsystem input_subsystem;
152 151
153 // Apply the command line arguments 152 // Apply the command line arguments
154 system.ApplySettings(); 153 system.ApplySettings();
@@ -167,27 +166,27 @@ int main(int argc, char** argv) {
167 system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>()); 166 system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>());
168 system.GetFileSystemController().CreateFactories(*system.GetFilesystem()); 167 system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
169 168
170 const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)}; 169 const Core::SystemResultStatus load_result{system.Load(*emu_window, filepath)};
171 170
172 switch (load_result) { 171 switch (load_result) {
173 case Core::System::ResultStatus::ErrorGetLoader: 172 case Core::SystemResultStatus::ErrorGetLoader:
174 LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath); 173 LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath);
175 return -1; 174 return -1;
176 case Core::System::ResultStatus::ErrorLoader: 175 case Core::SystemResultStatus::ErrorLoader:
177 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 176 LOG_CRITICAL(Frontend, "Failed to load ROM!");
178 return -1; 177 return -1;
179 case Core::System::ResultStatus::ErrorNotInitialized: 178 case Core::SystemResultStatus::ErrorNotInitialized:
180 LOG_CRITICAL(Frontend, "CPUCore not initialized"); 179 LOG_CRITICAL(Frontend, "CPUCore not initialized");
181 return -1; 180 return -1;
182 case Core::System::ResultStatus::ErrorVideoCore: 181 case Core::SystemResultStatus::ErrorVideoCore:
183 LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!"); 182 LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
184 return -1; 183 return -1;
185 case Core::System::ResultStatus::Success: 184 case Core::SystemResultStatus::Success:
186 break; // Expected case 185 break; // Expected case
187 default: 186 default:
188 if (static_cast<u32>(load_result) > 187 if (static_cast<u32>(load_result) >
189 static_cast<u32>(Core::System::ResultStatus::ErrorLoader)) { 188 static_cast<u32>(Core::SystemResultStatus::ErrorLoader)) {
190 const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader); 189 const u16 loader_id = static_cast<u16>(Core::SystemResultStatus::ErrorLoader);
191 const u16 error_id = static_cast<u16>(load_result) - loader_id; 190 const u16 error_id = static_cast<u16>(load_result) - loader_id;
192 LOG_CRITICAL(Frontend, 191 LOG_CRITICAL(Frontend,
193 "While attempting to load the ROM requested, an error occurred. Please " 192 "While attempting to load the ROM requested, an error occurred. Please "