src/video/wayland/SDL_waylandmouse.c
changeset 10304 ee83e0b4a36f
parent 10154 fae27a079fcb
child 10604 27d0fb08d755
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Thu Jun 23 18:39:05 2016 +0800
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Thu Sep 01 01:26:56 2016 -0700
     1.3 @@ -365,7 +365,13 @@
     1.4  static int
     1.5  Wayland_SetRelativeMouseMode(SDL_bool enabled)
     1.6  {
     1.7 -    return SDL_Unsupported();
     1.8 +    SDL_VideoDevice *vd = SDL_GetVideoDevice();
     1.9 +    SDL_VideoData *data = (SDL_VideoData *) vd->driverdata;
    1.10 +
    1.11 +    if (enabled)
    1.12 +        return Wayland_input_lock_pointer(data->input);
    1.13 +    else
    1.14 +        return Wayland_input_unlock_pointer(data->input);
    1.15  }
    1.16  
    1.17  void