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.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index b5392c499..d637dbd0c 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -23,6 +23,7 @@
23#include "yuzu_cmd/emu_window/emu_window_sdl2.h" 23#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
24 24
25#include <getopt.h> 25#include <getopt.h>
26#include "core/crypto/key_manager.h"
26#ifndef _MSC_VER 27#ifndef _MSC_VER
27#include <unistd.h> 28#include <unistd.h>
28#endif 29#endif
@@ -71,6 +72,7 @@ static void InitializeLogging() {
71/// Application entry point 72/// Application entry point
72int main(int argc, char** argv) { 73int main(int argc, char** argv) {
73 Config config; 74 Config config;
75
74 int option_index = 0; 76 int option_index = 0;
75 bool use_gdbstub = Settings::values.use_gdbstub; 77 bool use_gdbstub = Settings::values.use_gdbstub;
76 u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port); 78 u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port);
@@ -162,7 +164,7 @@ int main(int argc, char** argv) {
162 164
163 SCOPE_EXIT({ system.Shutdown(); }); 165 SCOPE_EXIT({ system.Shutdown(); });
164 166
165 const Core::System::ResultStatus load_result{system.Load(emu_window.get(), filepath)}; 167 const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)};
166 168
167 switch (load_result) { 169 switch (load_result) {
168 case Core::System::ResultStatus::ErrorGetLoader: 170 case Core::System::ResultStatus::ErrorGetLoader:
@@ -171,11 +173,15 @@ int main(int argc, char** argv) {
171 case Core::System::ResultStatus::ErrorLoader: 173 case Core::System::ResultStatus::ErrorLoader:
172 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 174 LOG_CRITICAL(Frontend, "Failed to load ROM!");
173 return -1; 175 return -1;
174 case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: 176 case Core::System::ResultStatus::ErrorLoader_ErrorMissingKeys:
175 LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " 177 LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and the keys required "
176 "being used with yuzu. \n\n For more information on dumping and " 178 "could not be found. Please refer to the yuzu wiki for help");
177 "decrypting games, please refer to: " 179 return -1;
178 "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); 180 case Core::System::ResultStatus::ErrorLoader_ErrorDecrypting:
181 LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and there was a "
182 "general error while decrypting. This could mean that the keys are "
183 "incorrect, game is invalid or game uses an unsupported method of "
184 "crypto. Please double-check your keys");
179 return -1; 185 return -1;
180 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: 186 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
181 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); 187 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
@@ -187,7 +193,7 @@ int main(int argc, char** argv) {
187 LOG_CRITICAL(Frontend, "Failed to determine system mode!"); 193 LOG_CRITICAL(Frontend, "Failed to determine system mode!");
188 return -1; 194 return -1;
189 case Core::System::ResultStatus::ErrorVideoCore: 195 case Core::System::ResultStatus::ErrorVideoCore:
190 LOG_CRITICAL(Frontend, "VideoCore not initialized"); 196 LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
191 return -1; 197 return -1;
192 case Core::System::ResultStatus::Success: 198 case Core::System::ResultStatus::Success:
193 break; // Expected case 199 break; // Expected case