src/video/wayland/SDL_waylandmouse.c
changeset 10130 eba8155e32b1
parent 10120 f49e8a97c214
child 10154 fae27a079fcb
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Mon Mar 28 21:02:30 2016 +0200
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Mon Mar 28 21:03:04 2016 +0200
     1.3 @@ -116,8 +116,7 @@
     1.4      shm_fd = wayland_create_tmp_file(size);
     1.5      if (shm_fd < 0)
     1.6      {
     1.7 -        fprintf(stderr, "creating mouse cursor buffer failed!\n");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Creating mouse cursor buffer failed.");
    1.10      }
    1.11  
    1.12      d->shm_data = mmap(NULL,
    1.13 @@ -128,9 +127,8 @@
    1.14                         0);
    1.15      if (d->shm_data == MAP_FAILED) {
    1.16          d->shm_data = NULL;
    1.17 -        fprintf (stderr, "mmap () failed\n");
    1.18          close (shm_fd);
    1.19 -        return -1;
    1.20 +        return SDL_SetError("mmap() failed.");
    1.21      }
    1.22  
    1.23      shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);