diff options
| author | 2018-07-02 10:13:26 -0600 | |
|---|---|---|
| committer | 2018-07-02 21:45:47 -0400 | |
| commit | 638956aa81de255bf4bbd4e69a717eabf4ceadb9 (patch) | |
| tree | 5783dda790575e047fa757d8c56e11f3fffe7646 /src/yuzu_cmd | |
| parent | Merge pull request #608 from Subv/depth (diff) | |
| download | yuzu-638956aa81de255bf4bbd4e69a717eabf4ceadb9.tar.gz yuzu-638956aa81de255bf4bbd4e69a717eabf4ceadb9.tar.xz yuzu-638956aa81de255bf4bbd4e69a717eabf4ceadb9.zip | |
Rename logging macro back to LOG_*
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 20 |
3 files changed, 23 insertions, 23 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 150915c17..3a311b69f 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 | NGLOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); | 30 | LOG_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 | NGLOG_ERROR(Config, "Failed."); | 37 | LOG_ERROR(Config, "Failed."); |
| 38 | return false; | 38 | return false; |
| 39 | } | 39 | } |
| 40 | NGLOG_INFO(Config, "Successfully loaded {}", location); | 40 | LOG_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 cfd8eb7e6..e6f0bbe8f 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -62,19 +62,19 @@ void EmuWindow_SDL2::Fullscreen() { | |||
| 62 | return; | 62 | return; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | NGLOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); | 65 | LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); |
| 66 | 66 | ||
| 67 | // Try a different fullscreening method | 67 | // Try a different fullscreening method |
| 68 | NGLOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); | 68 | LOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); |
| 69 | if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { | 69 | if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { |
| 70 | return; | 70 | return; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | NGLOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); | 73 | LOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); |
| 74 | 74 | ||
| 75 | // Fallback algorithm: Maximise window. | 75 | // Fallback algorithm: Maximise window. |
| 76 | // Works on all systems (unless something is seriously wrong), so no fallback for this one. | 76 | // Works on all systems (unless something is seriously wrong), so no fallback for this one. |
| 77 | NGLOG_INFO(Frontend, "Falling back on a maximised window..."); | 77 | LOG_INFO(Frontend, "Falling back on a maximised window..."); |
| 78 | SDL_MaximizeWindow(render_window); | 78 | SDL_MaximizeWindow(render_window); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| @@ -91,7 +91,7 @@ bool EmuWindow_SDL2::SupportsRequiredGLExtensions() { | |||
| 91 | unsupported_ext.push_back("ARB_vertex_attrib_binding"); | 91 | unsupported_ext.push_back("ARB_vertex_attrib_binding"); |
| 92 | 92 | ||
| 93 | for (const std::string& ext : unsupported_ext) | 93 | for (const std::string& ext : unsupported_ext) |
| 94 | NGLOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext); | 94 | LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext); |
| 95 | 95 | ||
| 96 | return unsupported_ext.empty(); | 96 | return unsupported_ext.empty(); |
| 97 | } | 97 | } |
| @@ -103,7 +103,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 103 | 103 | ||
| 104 | // Initialize the window | 104 | // Initialize the window |
| 105 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { | 105 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { |
| 106 | NGLOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); | 106 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); |
| 107 | exit(1); | 107 | exit(1); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -126,7 +126,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 126 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); | 126 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); |
| 127 | 127 | ||
| 128 | if (render_window == nullptr) { | 128 | if (render_window == nullptr) { |
| 129 | NGLOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); | 129 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); |
| 130 | exit(1); | 130 | exit(1); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| @@ -137,17 +137,17 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 137 | gl_context = SDL_GL_CreateContext(render_window); | 137 | gl_context = SDL_GL_CreateContext(render_window); |
| 138 | 138 | ||
| 139 | if (gl_context == nullptr) { | 139 | if (gl_context == nullptr) { |
| 140 | NGLOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); | 140 | LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); |
| 141 | exit(1); | 141 | exit(1); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { | 144 | if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { |
| 145 | NGLOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); | 145 | LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); |
| 146 | exit(1); | 146 | exit(1); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | if (!SupportsRequiredGLExtensions()) { | 149 | if (!SupportsRequiredGLExtensions()) { |
| 150 | NGLOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting..."); | 150 | LOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting..."); |
| 151 | exit(1); | 151 | exit(1); |
| 152 | } | 152 | } |
| 153 | 153 | ||
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 95e568b7b..91b024819 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -69,7 +69,7 @@ int main(int argc, char** argv) { | |||
| 69 | auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); | 69 | auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); |
| 70 | 70 | ||
| 71 | if (argv_w == nullptr) { | 71 | if (argv_w == nullptr) { |
| 72 | NGLOG_CRITICAL(Frontend, "Failed to get command line arguments"); | 72 | LOG_CRITICAL(Frontend, "Failed to get command line arguments"); |
| 73 | return -1; | 73 | return -1; |
| 74 | } | 74 | } |
| 75 | #endif | 75 | #endif |
| @@ -102,7 +102,7 @@ int main(int argc, char** argv) { | |||
| 102 | break; | 102 | break; |
| 103 | case 'f': | 103 | case 'f': |
| 104 | fullscreen = true; | 104 | fullscreen = true; |
| 105 | NGLOG_INFO(Frontend, "Starting in fullscreen mode..."); | 105 | LOG_INFO(Frontend, "Starting in fullscreen mode..."); |
| 106 | break; | 106 | break; |
| 107 | case 'h': | 107 | case 'h': |
| 108 | PrintHelp(argv[0]); | 108 | PrintHelp(argv[0]); |
| @@ -132,7 +132,7 @@ int main(int argc, char** argv) { | |||
| 132 | SCOPE_EXIT({ MicroProfileShutdown(); }); | 132 | SCOPE_EXIT({ MicroProfileShutdown(); }); |
| 133 | 133 | ||
| 134 | if (filepath.empty()) { | 134 | if (filepath.empty()) { |
| 135 | NGLOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); | 135 | LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); |
| 136 | return -1; | 136 | return -1; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| @@ -153,28 +153,28 @@ int main(int argc, char** argv) { | |||
| 153 | 153 | ||
| 154 | switch (load_result) { | 154 | switch (load_result) { |
| 155 | case Core::System::ResultStatus::ErrorGetLoader: | 155 | case Core::System::ResultStatus::ErrorGetLoader: |
| 156 | NGLOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); | 156 | LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); |
| 157 | return -1; | 157 | return -1; |
| 158 | case Core::System::ResultStatus::ErrorLoader: | 158 | case Core::System::ResultStatus::ErrorLoader: |
| 159 | NGLOG_CRITICAL(Frontend, "Failed to load ROM!"); | 159 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); |
| 160 | return -1; | 160 | return -1; |
| 161 | case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: | 161 | case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: |
| 162 | NGLOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " | 162 | LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " |
| 163 | "being used with yuzu. \n\n For more information on dumping and " | 163 | "being used with yuzu. \n\n For more information on dumping and " |
| 164 | "decrypting games, please refer to: " | 164 | "decrypting games, please refer to: " |
| 165 | "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); | 165 | "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); |
| 166 | return -1; | 166 | return -1; |
| 167 | case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: | 167 | case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: |
| 168 | NGLOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); | 168 | LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); |
| 169 | return -1; | 169 | return -1; |
| 170 | case Core::System::ResultStatus::ErrorNotInitialized: | 170 | case Core::System::ResultStatus::ErrorNotInitialized: |
| 171 | NGLOG_CRITICAL(Frontend, "CPUCore not initialized"); | 171 | LOG_CRITICAL(Frontend, "CPUCore not initialized"); |
| 172 | return -1; | 172 | return -1; |
| 173 | case Core::System::ResultStatus::ErrorSystemMode: | 173 | case Core::System::ResultStatus::ErrorSystemMode: |
| 174 | NGLOG_CRITICAL(Frontend, "Failed to determine system mode!"); | 174 | LOG_CRITICAL(Frontend, "Failed to determine system mode!"); |
| 175 | return -1; | 175 | return -1; |
| 176 | case Core::System::ResultStatus::ErrorVideoCore: | 176 | case Core::System::ResultStatus::ErrorVideoCore: |
| 177 | NGLOG_CRITICAL(Frontend, "VideoCore not initialized"); | 177 | LOG_CRITICAL(Frontend, "VideoCore not initialized"); |
| 178 | return -1; | 178 | return -1; |
| 179 | case Core::System::ResultStatus::Success: | 179 | case Core::System::ResultStatus::Success: |
| 180 | break; // Expected case | 180 | break; // Expected case |