From ead393739406bd996b8583bdfa24e87d1492f39f Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 6 Jan 2015 02:38:00 +0100 Subject: [PATCH] Mir string fixes. --- src/mir_init.c | 9 ++++++--- src/mir_monitor.c | 4 ++-- src/mir_window.c | 42 +++++++++++++++++++++--------------------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/mir_init.c b/src/mir_init.c index b69eb3f8..dfc50d52 100644 --- a/src/mir_init.c +++ b/src/mir_init.c @@ -27,6 +27,8 @@ #include "internal.h" #include +#include + ////////////////////////////////////////////////////////////////////////// ////// GLFW internal API ////// @@ -41,7 +43,7 @@ int _glfwPlatformInit(void) if (!mir_connection_is_valid(_glfw.mir.connection)) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unable to connect to Server %s", + "Mir: Unable to connect to server: %s", mir_connection_get_error_message(_glfw.mir.connection)); mir_connection_release(_glfw.mir.connection); @@ -64,7 +66,8 @@ int _glfwPlatformInit(void) if (error) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Failed to create Event Mutex Error: %i\n", error); + "Mir: Failed to create event mutex: %s\n", + strerror(error)); return GL_FALSE; } @@ -85,7 +88,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_NUMBER " Mir EGL " + const char* version = _GLFW_VERSION_NUMBER " Mir EGL" #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) " clock_gettime" #endif diff --git a/src/mir_monitor.c b/src/mir_monitor.c index bdf47bdc..9776b10e 100644 --- a/src/mir_monitor.c +++ b/src/mir_monitor.c @@ -127,12 +127,12 @@ void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } diff --git a/src/mir_window.c b/src/mir_window.c index c9812f52..9a9f1f6a 100644 --- a/src/mir_window.c +++ b/src/mir_window.c @@ -407,7 +407,7 @@ static int createSurface(_GLFWwindow* window) if (!mir_surface_is_valid(window->mir.surface)) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unable to create surface %s", + "Mir: Unable to create surface: %s", mir_surface_get_error_message(window->mir.surface)); mir_surface_release_sync(window->mir.surface); @@ -503,13 +503,13 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window) void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, @@ -517,19 +517,19 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, int* right, int* bottom) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height) @@ -553,39 +553,39 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window) void _glfwPlatformHideWindow(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformShowWindow(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformUnhideWindow(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } int _glfwPlatformWindowFocused(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return GL_FALSE; } int _glfwPlatformWindowIconified(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return GL_FALSE; } int _glfwPlatformWindowVisible(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return GL_FALSE; } @@ -629,7 +629,7 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor, int xhot, int yhot) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return GL_FALSE; } @@ -637,7 +637,7 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor, int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return GL_FALSE; } @@ -645,43 +645,43 @@ int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) void _glfwPlatformDestroyCursor(_GLFWcursor* cursor) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformApplyCursorMode(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); } const char* _glfwPlatformGetClipboardString(_GLFWwindow* window) { _glfwInputError(GLFW_PLATFORM_ERROR, - "Mir: Unsupported Function %s!", __PRETTY_FUNCTION__); + "Mir: Unsupported function %s!", __PRETTY_FUNCTION__); return NULL; }