wayland: Coding style cleanup

Fixes * positioning, indentation and newline inconsistencies.
master
Jonas Ådahl ago%!(EXTRA string=11 years)
parent b1033a3443
commit 4dd669661b
  1. 21
      src/wl_init.c
  2. 9
      src/wl_window.c

@ -573,18 +573,25 @@ int _glfwPlatformInit(void)
_glfwInitTimer();
_glfwInitJoysticks();
if (_glfw.wl.pointer && _glfw.wl.shm){
if (_glfw.wl.pointer && _glfw.wl.shm)
{
_glfw.wl.cursorTheme = wl_cursor_theme_load(NULL, 32, _glfw.wl.shm);
if (!_glfw.wl.cursorTheme) {
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: Unable to load default cursor theme\n");
if (!_glfw.wl.cursorTheme)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unable to load default cursor theme\n");
return GL_FALSE;
}
_glfw.wl.defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, "left_ptr");
if (!_glfw.wl.defaultCursor) {
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: Unable to load default left pointer\n");
_glfw.wl.defaultCursor =
wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, "left_ptr");
if (!_glfw.wl.defaultCursor)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unable to load default left pointer\n");
return GL_FALSE;
}
_glfw.wl.cursorSurface = wl_compositor_create_surface(_glfw.wl.compositor);
_glfw.wl.cursorSurface =
wl_compositor_create_surface(_glfw.wl.compositor);
}
return GL_TRUE;

@ -377,7 +377,8 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
int fd, i;
fd = createAnonymousFile(length);
if (fd < 0) {
if (fd < 0)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Creating a buffer file for %d B failed: %m\n",
length);
@ -385,7 +386,8 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
}
data = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (data == MAP_FAILED) {
if (data == MAP_FAILED)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Cursor mmap failed: %m\n");
close(fd);
@ -405,7 +407,8 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
*target++ = source[3];
}
cursor->wl.buffer = wl_shm_pool_create_buffer(pool, 0,
cursor->wl.buffer =
wl_shm_pool_create_buffer(pool, 0,
image->width,
image->height,
stride, WL_SHM_FORMAT_ARGB8888);

Loading…
Cancel
Save