Wayland: Fix phrasing of error messages
This is adapted to 3.3-stable from
2d45681bc3
.
This commit is contained in:
parent
25db8f8014
commit
32bedd9a94
@ -147,7 +147,7 @@ static void setCursor(_GLFWwindow* window, const char* name)
|
||||
if (!cursor)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Standard cursor not found");
|
||||
"Wayland: Standard cursor shape unavailable");
|
||||
return;
|
||||
}
|
||||
// TODO: handle animated cursors too.
|
||||
@ -1040,7 +1040,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.wl.cursor.handle)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Failed to open libwayland-cursor");
|
||||
"Wayland: Failed to load libwayland-cursor");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
@ -1057,7 +1057,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.wl.egl.handle)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Failed to open libwayland-egl");
|
||||
"Wayland: Failed to load libwayland-egl");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
@ -1072,7 +1072,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.wl.xkb.handle)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Failed to open libxkbcommon");
|
||||
"Wayland: Failed to load libxkbcommon");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
@ -1173,7 +1173,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.wl.cursorTheme)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Unable to load default cursor theme");
|
||||
"Wayland: Failed to load default cursor theme");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
// If this happens to be NULL, we just fallback to the scale=1 version.
|
||||
@ -1196,7 +1196,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.wl.clipboardString)
|
||||
{
|
||||
_glfwInputError(GLFW_OUT_OF_MEMORY,
|
||||
"Wayland: Unable to allocate clipboard memory");
|
||||
"Wayland: Failed to allocate clipboard memory");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
|
||||
if (fd < 0)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Creating a buffer file for %d B failed: %s",
|
||||
"Wayland: Failed to create buffer file of size %d: %s",
|
||||
length, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
@ -218,7 +218,7 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
|
||||
if (data == MAP_FAILED)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: mmap failed: %s", strerror(errno));
|
||||
"Wayland: Failed to map file: %s", strerror(errno));
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
@ -526,7 +526,7 @@ static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)
|
||||
_glfw.wl.idleInhibitManager, window->wl.surface);
|
||||
if (!window->wl.idleInhibitor)
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Idle inhibitor creation failed");
|
||||
"Wayland: Failed to create idle inhibitor");
|
||||
}
|
||||
else if (!enable && window->wl.idleInhibitor)
|
||||
{
|
||||
@ -719,7 +719,7 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
|
||||
if (!window->wl.xdg.surface)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: xdg-surface creation failed");
|
||||
"Wayland: Failed to create xdg-surface for window");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
@ -731,7 +731,7 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
|
||||
if (!window->wl.xdg.toplevel)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: xdg-toplevel creation failed");
|
||||
"Wayland: Failed to create xdg-toplevel for window");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
@ -1815,7 +1815,7 @@ void _glfwPlatformSetClipboardString(const char* string)
|
||||
if (!_glfw.wl.dataSource)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Impossible to create clipboard source");
|
||||
"Wayland: Failed to create clipboard data source");
|
||||
free(_glfw.wl.clipboardSendString);
|
||||
_glfw.wl.clipboardSendString = NULL;
|
||||
return;
|
||||
@ -1837,7 +1837,7 @@ static GLFWbool growClipboardString(void)
|
||||
if (!clipboard)
|
||||
{
|
||||
_glfwInputError(GLFW_OUT_OF_MEMORY,
|
||||
"Wayland: Impossible to grow clipboard string");
|
||||
"Wayland: Failed to grow clipboard string");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
_glfw.wl.clipboardString = clipboard;
|
||||
@ -1854,7 +1854,7 @@ const char* _glfwPlatformGetClipboardString(void)
|
||||
if (!_glfw.wl.dataOffer)
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"No clipboard data has been sent yet");
|
||||
"Wayland: No clipboard data available");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1863,7 +1863,7 @@ const char* _glfwPlatformGetClipboardString(void)
|
||||
{
|
||||
// TODO: also report errno maybe?
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Impossible to create clipboard pipe fds");
|
||||
"Wayland: Failed to create clipboard pipe fds");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1896,7 +1896,7 @@ const char* _glfwPlatformGetClipboardString(void)
|
||||
{
|
||||
// TODO: also report errno maybe.
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Impossible to read from clipboard fd");
|
||||
"Wayland: Failed to read from clipboard fd");
|
||||
close(fds[0]);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user