summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/game_list.cpp5
-rw-r--r--src/yuzu/main.cpp10
-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
5 files changed, 26 insertions, 27 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 76ced4de4..bbd681eae 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -315,7 +315,8 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
315void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { 315void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) {
316 if (!FileUtil::Exists(dir_path.toStdString()) || 316 if (!FileUtil::Exists(dir_path.toStdString()) ||
317 !FileUtil::IsDirectory(dir_path.toStdString())) { 317 !FileUtil::IsDirectory(dir_path.toStdString())) {
318 LOG_ERROR(Frontend, "Could not find game list folder at %s", dir_path.toLocal8Bit().data()); 318 NGLOG_ERROR(Frontend, "Could not find game list folder at {}",
319 dir_path.toLocal8Bit().data());
319 search_field->setFilterResult(0, 0); 320 search_field->setFilterResult(0, 0);
320 return; 321 return;
321 } 322 }
@@ -364,7 +365,7 @@ static bool HasSupportedFileExtension(const std::string& file_name) {
364 365
365void GameList::RefreshGameDirectory() { 366void GameList::RefreshGameDirectory() {
366 if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) { 367 if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) {
367 LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); 368 NGLOG_INFO(Frontend, "Change detected in the games directory. Reloading game list.");
368 search_field->clear(); 369 search_field->clear();
369 PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); 370 PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
370 } 371 }
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 20796e92c..a5d7807e2 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -359,19 +359,17 @@ bool GMainWindow::LoadROM(const QString& filename) {
359 if (result != Core::System::ResultStatus::Success) { 359 if (result != Core::System::ResultStatus::Success) {
360 switch (result) { 360 switch (result) {
361 case Core::System::ResultStatus::ErrorGetLoader: 361 case Core::System::ResultStatus::ErrorGetLoader:
362 LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", 362 NGLOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString());
363 filename.toStdString().c_str());
364 QMessageBox::critical(this, tr("Error while loading ROM!"), 363 QMessageBox::critical(this, tr("Error while loading ROM!"),
365 tr("The ROM format is not supported.")); 364 tr("The ROM format is not supported."));
366 break; 365 break;
367 case Core::System::ResultStatus::ErrorUnsupportedArch: 366 case Core::System::ResultStatus::ErrorUnsupportedArch:
368 LOG_CRITICAL(Frontend, "Unsupported architecture detected!", 367 NGLOG_CRITICAL(Frontend, "Unsupported architecture detected!", filename.toStdString());
369 filename.toStdString().c_str());
370 QMessageBox::critical(this, tr("Error while loading ROM!"), 368 QMessageBox::critical(this, tr("Error while loading ROM!"),
371 tr("The ROM uses currently unusable 32-bit architecture")); 369 tr("The ROM uses currently unusable 32-bit architecture"));
372 break; 370 break;
373 case Core::System::ResultStatus::ErrorSystemMode: 371 case Core::System::ResultStatus::ErrorSystemMode:
374 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 372 NGLOG_CRITICAL(Frontend, "Failed to load ROM!");
375 QMessageBox::critical(this, tr("Error while loading ROM!"), 373 QMessageBox::critical(this, tr("Error while loading ROM!"),
376 tr("Could not determine the system mode.")); 374 tr("Could not determine the system mode."));
377 break; 375 break;
@@ -859,7 +857,7 @@ void GMainWindow::UpdateUITheme() {
859 QString theme_uri(":" + UISettings::values.theme + "/style.qss"); 857 QString theme_uri(":" + UISettings::values.theme + "/style.qss");
860 QFile f(theme_uri); 858 QFile f(theme_uri);
861 if (!f.exists()) { 859 if (!f.exists()) {
862 LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); 860 NGLOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
863 } else { 861 } else {
864 f.open(QFile::ReadOnly | QFile::Text); 862 f.open(QFile::ReadOnly | QFile::Text);
865 QTextStream ts(&f); 863 QTextStream ts(&f);
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