From ef24e72b2618806f64345544fa46c84f3f494890 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 20 Jan 2015 17:16:47 -0800 Subject: Asserts: break/crash program, fit to style guide; log.h->assert.h Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft. --- src/citra/emu_window/emu_window_glfw.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/citra') diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 9d1adc2f..8a3ee64a 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() { } void EmuWindow_GLFW::OnFramebufferResizeEvent(GLFWwindow* win, int width, int height) { - _dbg_assert_(Frontend, width > 0); - _dbg_assert_(Frontend, height > 0); + ASSERT(width > 0); + ASSERT(height > 0); GetEmuWindow(win)->NotifyFramebufferSizeChanged(std::pair(width, height)); } void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int height) { - _dbg_assert_(Frontend, width > 0); - _dbg_assert_(Frontend, height > 0); + ASSERT(width > 0); + ASSERT(height > 0); // NOTE: GLFW provides no proper way to set a minimal window size. // Hence, we just ignore the corresponding EmuWindow hint. @@ -149,7 +149,7 @@ void EmuWindow_GLFW::OnMinimalClientAreaChangeRequest(const std::pair current_size; glfwGetWindowSize(m_render_window, ¤t_size.first, ¤t_size.second); - _dbg_assert_(Frontend, (int)minimal_size.first > 0 && (int)minimal_size.second > 0); + DEBUG_ASSERT((int)minimal_size.first > 0 && (int)minimal_size.second > 0); int new_width = std::max(current_size.first, (int)minimal_size.first); int new_height = std::max(current_size.second, (int)minimal_size.second); -- cgit v1.2.3