src/events/SDL_mouse.c
changeset 6675 20f3cdea0fd2
parent 6673 78f18a929123
child 6755 af77e1a6faf0
     1.1 --- a/src/events/SDL_mouse.c	Fri Nov 16 09:23:18 2012 -0300
     1.2 +++ b/src/events/SDL_mouse.c	Mon Nov 19 15:11:10 2012 -0800
     1.3 @@ -528,6 +528,26 @@
     1.4      return cursor;
     1.5  }
     1.6  
     1.7 +SDL_Cursor *
     1.8 +SDL_CreateSystemCursor(SDL_SystemCursor id)
     1.9 +{
    1.10 +    SDL_Mouse *mouse = SDL_GetMouse();
    1.11 +    SDL_Cursor *cursor;
    1.12 +
    1.13 +    if (!mouse->CreateSystemCursor) {
    1.14 +        SDL_SetError("CreateSystemCursor is not currently supported");
    1.15 +        return NULL;
    1.16 +    }
    1.17 +
    1.18 +	cursor = mouse->CreateSystemCursor(id);
    1.19 +    if (cursor) {
    1.20 +        cursor->next = mouse->cursors;
    1.21 +        mouse->cursors = cursor;
    1.22 +    }
    1.23 +
    1.24 +	return cursor;
    1.25 +}
    1.26 +
    1.27  /* SDL_SetCursor(NULL) can be used to force the cursor redraw,
    1.28     if this is desired for any reason.  This is used when setting
    1.29     the video mode and when the SDL window gains the mouse focus.