diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-15 23:15:42 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-15 23:15:42 +0000 |
commit | 7f2ec301cf209e4c31c76afe8d5e903fbdec4405 (patch) | |
tree | 18f5a8d44ef0b3a62142343aa7560aaf3c13e097 /framebuffer/fb_cursor.c | |
parent | e8cb20ac2a2d18b22d1050c4d2ae07dcede5ab7b (diff) | |
download | netsurf-7f2ec301cf209e4c31c76afe8d5e903fbdec4405.tar.gz netsurf-7f2ec301cf209e4c31c76afe8d5e903fbdec4405.tar.bz2 |
make pointer image change
svn path=/trunk/netsurf/; revision=6538
Diffstat (limited to 'framebuffer/fb_cursor.c')
-rw-r--r-- | framebuffer/fb_cursor.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/framebuffer/fb_cursor.c b/framebuffer/fb_cursor.c index 96e280223..2b7772d9d 100644 --- a/framebuffer/fb_cursor.c +++ b/framebuffer/fb_cursor.c @@ -198,28 +198,26 @@ fb_cursor_plot(framebuffer_t *fb) fb_plot_ctx = saved_plot_ctx; } +void +fb_cursor_set(fb_cursor_t *cursor, struct bitmap *bmp) +{ + cursor->width = bmp->width; + cursor->height = bmp->height; + cursor->bitmap = bmp; +} fb_cursor_t * -fb_cursor_init(framebuffer_t *fb) +fb_cursor_init(framebuffer_t *fb, struct bitmap *bmp) { fb_cursor_t *cursor; cursor = calloc(1, sizeof(fb_cursor_t)); cursor->x = fb->width / 2; cursor->y = fb->height / 2; - - cursor->width = pointer_image.width; - cursor->height = pointer_image.height; - cursor->bitmap = bitmap_create(cursor->width, cursor->height, 0); - - memcpy(cursor->bitmap->pixdata, - pointer_image.pixel_data, - pointer_image.width * - pointer_image.height * - pointer_image.bytes_per_pixel); - cursor->plotted = false; + fb_cursor_set(cursor, bmp); + return cursor; } |