src/video/wayland/SDL_waylandmouse.c
changeset 8721 d73e451f1dc5
parent 8711 46f85bfe9303
child 8815 c6d0a457f3b2
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Fri Apr 18 12:43:10 2014 -0700
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Sat Apr 19 02:17:34 2014 -0400
     1.3 @@ -106,6 +106,7 @@
     1.4  {
     1.5      SDL_VideoDevice *vd = SDL_GetVideoDevice();
     1.6      SDL_VideoData *data = (SDL_VideoData *) vd->driverdata;
     1.7 +    struct wl_shm_pool *shm_pool;
     1.8  
     1.9      int stride = width * 4;
    1.10      int size = stride * height;
    1.11 @@ -131,9 +132,7 @@
    1.12          close (shm_fd);
    1.13      }
    1.14  
    1.15 -    struct wl_shm_pool *shm_pool = wl_shm_create_pool(data->shm,
    1.16 -                                                      shm_fd,
    1.17 -                                                      size);
    1.18 +    shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
    1.19      d->buffer = wl_shm_pool_create_buffer(shm_pool,
    1.20                                            0,
    1.21                                            width,
    1.22 @@ -280,18 +279,18 @@
    1.23          break;
    1.24      }
    1.25  
    1.26 -    SDL_Cursor *sdl_cursor = CreateCursorFromWlCursor (d, cursor);
    1.27 -
    1.28 -    return sdl_cursor;
    1.29 +    return CreateCursorFromWlCursor(d, cursor);
    1.30  }
    1.31  
    1.32  static void
    1.33  Wayland_FreeCursor(SDL_Cursor *cursor)
    1.34  {
    1.35 +    Wayland_CursorData *d;
    1.36 +
    1.37      if (!cursor)
    1.38          return;
    1.39  
    1.40 -    Wayland_CursorData *d = cursor->driverdata;
    1.41 +    d = cursor->driverdata;
    1.42  
    1.43      /* Probably not a cursor we own */
    1.44      if (!d)