Commit efdbfd38 authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Cleanup

parent e8f3de0f
......@@ -491,18 +491,19 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
{
struct wl_cursor* standard_cursor;
struct wl_cursor* standardCursor;
standard_cursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
translateCursorShape(shape));
if (!standard_cursor) {
standardCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
translateCursorShape(shape));
if (!standardCursor)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Standard cursor \"%s\" not found",
translateCursorShape(shape));
return GLFW_FALSE;
}
cursor->wl.image = standard_cursor->images[0];
cursor->wl.image = standardCursor->images[0];
return GLFW_TRUE;
}
......@@ -534,7 +535,9 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
if (window->cursorMode == GLFW_CURSOR_NORMAL)
{
if (cursor == NULL)
if (cursor)
image = cursor->wl.image;
else
{
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
"left_ptr");
......@@ -546,10 +549,6 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
}
image = defaultCursor->images[0];
}
else
{
image = cursor->wl.image;
}
if (image)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment