summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp6
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp8
-rw-r--r--src/yuzu_cmd/yuzu.cpp24
3 files changed, 19 insertions, 19 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 8b479bc6d..675f9cafa 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -27,17 +27,17 @@ bool Config::LoadINI(const std::string& default_contents, bool retry) {
27 const char* location = this->sdl2_config_loc.c_str(); 27 const char* location = this->sdl2_config_loc.c_str();
28 if (sdl2_config->ParseError() < 0) { 28 if (sdl2_config->ParseError() < 0) {
29 if (retry) { 29 if (retry) {
30 LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); 30 NGLOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location);
31 FileUtil::CreateFullPath(location); 31 FileUtil::CreateFullPath(location);
32 FileUtil::WriteStringToFile(true, default_contents, location); 32 FileUtil::WriteStringToFile(true, default_contents, location);
33 sdl2_config = std::make_unique<INIReader>(location); // Reopen file 33 sdl2_config = std::make_unique<INIReader>(location); // Reopen file
34 34
35 return LoadINI(default_contents, false); 35 return LoadINI(default_contents, false);
36 } 36 }
37 LOG_ERROR(Config, "Failed."); 37 NGLOG_ERROR(Config, "Failed.");
38 return false; 38 return false;
39 } 39 }
40 LOG_INFO(Config, "Successfully loaded %s", location); 40 NGLOG_INFO(Config, "Successfully loaded {}", location);
41 return true; 41 return true;
42} 42}
43 43
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 36d40a9b5..b6ed0c498 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -84,7 +84,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
84 84
85 // Initialize the window 85 // Initialize the window
86 if (SDL_Init(SDL_INIT_VIDEO) < 0) { 86 if (SDL_Init(SDL_INIT_VIDEO) < 0) {
87 LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); 87 NGLOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
88 exit(1); 88 exit(1);
89 } 89 }
90 90
@@ -107,7 +107,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
107 SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); 107 SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
108 108
109 if (render_window == nullptr) { 109 if (render_window == nullptr) {
110 LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); 110 NGLOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting...");
111 exit(1); 111 exit(1);
112 } 112 }
113 113
@@ -118,12 +118,12 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
118 gl_context = SDL_GL_CreateContext(render_window); 118 gl_context = SDL_GL_CreateContext(render_window);
119 119
120 if (gl_context == nullptr) { 120 if (gl_context == nullptr) {
121 LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); 121 NGLOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting...");
122 exit(1); 122 exit(1);
123 } 123 }
124 124
125 if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { 125 if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) {
126 LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); 126 NGLOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting...");
127 exit(1); 127 exit(1);
128 } 128 }
129 129
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 39603e881..f99413966 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -71,7 +71,7 @@ int main(int argc, char** argv) {
71 auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); 71 auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w);
72 72
73 if (argv_w == nullptr) { 73 if (argv_w == nullptr) {
74 LOG_CRITICAL(Frontend, "Failed to get command line arguments"); 74 NGLOG_CRITICAL(Frontend, "Failed to get command line arguments");
75 return -1; 75 return -1;
76 } 76 }
77#endif 77#endif
@@ -134,7 +134,7 @@ int main(int argc, char** argv) {
134 SCOPE_EXIT({ MicroProfileShutdown(); }); 134 SCOPE_EXIT({ MicroProfileShutdown(); });
135 135
136 if (filepath.empty()) { 136 if (filepath.empty()) {
137 LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); 137 NGLOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
138 return -1; 138 return -1;
139 } 139 }
140 140
@@ -155,28 +155,28 @@ int main(int argc, char** argv) {
155 155
156 switch (load_result) { 156 switch (load_result) {
157 case Core::System::ResultStatus::ErrorGetLoader: 157 case Core::System::ResultStatus::ErrorGetLoader:
158 LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); 158 NGLOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str());
159 return -1; 159 return -1;
160 case Core::System::ResultStatus::ErrorLoader: 160 case Core::System::ResultStatus::ErrorLoader:
161 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 161 NGLOG_CRITICAL(Frontend, "Failed to load ROM!");
162 return -1; 162 return -1;
163 case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: 163 case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted:
164 LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " 164 NGLOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
165 "being used with yuzu. \n\n For more information on dumping and " 165 "being used with yuzu. \n\n For more information on dumping and "
166 "decrypting games, please refer to: " 166 "decrypting games, please refer to: "
167 "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); 167 "https://yuzu-emu.org/wiki/dumping-game-cartridges/");
168 return -1; 168 return -1;
169 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: 169 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
170 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); 170 NGLOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
171 return -1; 171 return -1;
172 case Core::System::ResultStatus::ErrorNotInitialized: 172 case Core::System::ResultStatus::ErrorNotInitialized:
173 LOG_CRITICAL(Frontend, "CPUCore not initialized"); 173 NGLOG_CRITICAL(Frontend, "CPUCore not initialized");
174 return -1; 174 return -1;
175 case Core::System::ResultStatus::ErrorSystemMode: 175 case Core::System::ResultStatus::ErrorSystemMode:
176 LOG_CRITICAL(Frontend, "Failed to determine system mode!"); 176 NGLOG_CRITICAL(Frontend, "Failed to determine system mode!");
177 return -1; 177 return -1;
178 case Core::System::ResultStatus::ErrorVideoCore: 178 case Core::System::ResultStatus::ErrorVideoCore:
179 LOG_CRITICAL(Frontend, "VideoCore not initialized"); 179 NGLOG_CRITICAL(Frontend, "VideoCore not initialized");
180 return -1; 180 return -1;
181 case Core::System::ResultStatus::Success: 181 case Core::System::ResultStatus::Success:
182 break; // Expected case 182 break; // Expected case