diff options
| author | 2014-12-05 23:53:49 -0200 | |
|---|---|---|
| committer | 2014-12-13 02:08:02 -0200 | |
| commit | 0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch) | |
| tree | 40fee084c551bfb497e68181447298f862ea68ca /src/citra | |
| parent | Implement text path trimming for shorter paths. (diff) | |
| download | yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip | |
Convert old logging calls to new logging macros
Diffstat (limited to 'src/citra')
| -rw-r--r-- | src/citra/citra.cpp | 4 | ||||
| -rw-r--r-- | src/citra/config.cpp | 6 | ||||
| -rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 7c031ce8d..d192428e9 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -27,7 +27,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 27 | }); | 27 | }); |
| 28 | 28 | ||
| 29 | if (argc < 2) { | 29 | if (argc < 2) { |
| 30 | ERROR_LOG(BOOT, "Failed to load ROM: No ROM specified"); | 30 | LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); |
| 31 | return -1; | 31 | return -1; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| @@ -40,7 +40,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 40 | 40 | ||
| 41 | Loader::ResultStatus load_result = Loader::LoadFile(boot_filename); | 41 | Loader::ResultStatus load_result = Loader::LoadFile(boot_filename); |
| 42 | if (Loader::ResultStatus::Success != load_result) { | 42 | if (Loader::ResultStatus::Success != load_result) { |
| 43 | ERROR_LOG(BOOT, "Failed to load ROM (Error %i)!", load_result); | 43 | LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); |
| 44 | return -1; | 44 | return -1; |
| 45 | } | 45 | } |
| 46 | 46 | ||
diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 1f8f5922b..fe0ebe5a8 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp | |||
| @@ -22,17 +22,17 @@ Config::Config() { | |||
| 22 | bool Config::LoadINI(INIReader* config, const char* location, const std::string& default_contents, bool retry) { | 22 | bool Config::LoadINI(INIReader* config, const char* location, const std::string& default_contents, bool retry) { |
| 23 | if (config->ParseError() < 0) { | 23 | if (config->ParseError() < 0) { |
| 24 | if (retry) { | 24 | if (retry) { |
| 25 | ERROR_LOG(CONFIG, "Failed to load %s. Creating file from defaults...", location); | 25 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); |
| 26 | FileUtil::CreateFullPath(location); | 26 | FileUtil::CreateFullPath(location); |
| 27 | FileUtil::WriteStringToFile(true, default_contents, location); | 27 | FileUtil::WriteStringToFile(true, default_contents, location); |
| 28 | *config = INIReader(location); // Reopen file | 28 | *config = INIReader(location); // Reopen file |
| 29 | 29 | ||
| 30 | return LoadINI(config, location, default_contents, false); | 30 | return LoadINI(config, location, default_contents, false); |
| 31 | } | 31 | } |
| 32 | ERROR_LOG(CONFIG, "Failed."); | 32 | LOG_ERROR(Config, "Failed."); |
| 33 | return false; | 33 | return false; |
| 34 | } | 34 | } |
| 35 | INFO_LOG(CONFIG, "Successfully loaded %s", location); | 35 | LOG_INFO(Config, "Successfully loaded %s", location); |
| 36 | return true; | 36 | return true; |
| 37 | } | 37 | } |
| 38 | 38 | ||
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 982619126..929e09f43 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp | |||
| @@ -36,15 +36,15 @@ const bool EmuWindow_GLFW::IsOpen() { | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void EmuWindow_GLFW::OnFramebufferResizeEvent(GLFWwindow* win, int width, int height) { | 38 | void EmuWindow_GLFW::OnFramebufferResizeEvent(GLFWwindow* win, int width, int height) { |
| 39 | _dbg_assert_(GUI, width > 0); | 39 | _dbg_assert_(Frontend, width > 0); |
| 40 | _dbg_assert_(GUI, height > 0); | 40 | _dbg_assert_(Frontend, height > 0); |
| 41 | 41 | ||
| 42 | GetEmuWindow(win)->NotifyFramebufferSizeChanged(std::pair<unsigned,unsigned>(width, height)); | 42 | GetEmuWindow(win)->NotifyFramebufferSizeChanged(std::pair<unsigned,unsigned>(width, height)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int height) { | 45 | void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int height) { |
| 46 | _dbg_assert_(GUI, width > 0); | 46 | _dbg_assert_(Frontend, width > 0); |
| 47 | _dbg_assert_(GUI, height > 0); | 47 | _dbg_assert_(Frontend, height > 0); |
| 48 | 48 | ||
| 49 | // NOTE: GLFW provides no proper way to set a minimal window size. | 49 | // NOTE: GLFW provides no proper way to set a minimal window size. |
| 50 | // Hence, we just ignore the corresponding EmuWindow hint. | 50 | // Hence, we just ignore the corresponding EmuWindow hint. |
| @@ -59,12 +59,12 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 59 | ReloadSetKeymaps(); | 59 | ReloadSetKeymaps(); |
| 60 | 60 | ||
| 61 | glfwSetErrorCallback([](int error, const char *desc){ | 61 | glfwSetErrorCallback([](int error, const char *desc){ |
| 62 | ERROR_LOG(GUI, "GLFW 0x%08x: %s", error, desc); | 62 | LOG_ERROR(Frontend, "GLFW 0x%08x: %s", error, desc); |
| 63 | }); | 63 | }); |
| 64 | 64 | ||
| 65 | // Initialize the window | 65 | // Initialize the window |
| 66 | if(glfwInit() != GL_TRUE) { | 66 | if(glfwInit() != GL_TRUE) { |
| 67 | ERROR_LOG(GUI, "Failed to initialize GLFW! Exiting..."); | 67 | LOG_CRITICAL(Frontend, "Failed to initialize GLFW! Exiting..."); |
| 68 | exit(1); | 68 | exit(1); |
| 69 | } | 69 | } |
| 70 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); | 70 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); |
| @@ -79,7 +79,7 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 79 | window_title.c_str(), nullptr, nullptr); | 79 | window_title.c_str(), nullptr, nullptr); |
| 80 | 80 | ||
| 81 | if (m_render_window == nullptr) { | 81 | if (m_render_window == nullptr) { |
| 82 | ERROR_LOG(GUI, "Failed to create GLFW window! Exiting..."); | 82 | LOG_CRITICAL(Frontend, "Failed to create GLFW window! Exiting..."); |
| 83 | exit(1); | 83 | exit(1); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -149,7 +149,7 @@ void EmuWindow_GLFW::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,u | |||
| 149 | std::pair<int,int> current_size; | 149 | std::pair<int,int> current_size; |
| 150 | glfwGetWindowSize(m_render_window, ¤t_size.first, ¤t_size.second); | 150 | glfwGetWindowSize(m_render_window, ¤t_size.first, ¤t_size.second); |
| 151 | 151 | ||
| 152 | _dbg_assert_(GUI, (int)minimal_size.first > 0 && (int)minimal_size.second > 0); | 152 | _dbg_assert_(Frontend, (int)minimal_size.first > 0 && (int)minimal_size.second > 0); |
| 153 | int new_width = std::max(current_size.first, (int)minimal_size.first); | 153 | int new_width = std::max(current_size.first, (int)minimal_size.first); |
| 154 | int new_height = std::max(current_size.second, (int)minimal_size.second); | 154 | int new_height = std::max(current_size.second, (int)minimal_size.second); |
| 155 | 155 | ||