Changes in uspace/lib/draw/cursor/embedded.c [6a3d0c7:6d5e378] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/cursor/embedded.c
r6a3d0c7 r6d5e378 46 46 assert(state_count); 47 47 assert(data); 48 48 49 49 (*state_count) = 1; 50 50 (*data) = NULL; … … 53 53 static surface_t *cde_render(uint8_t state) 54 54 { 55 if (state != 0) 55 if (state != 0) { 56 56 return NULL; 57 57 } 58 58 59 surface_t *surface = surface_create(CURSOR_WIDTH, CURSOR_HEIGHT, NULL, 0); 59 if (!surface) 60 61 if (!surface) { 60 62 return NULL; 63 } 61 64 62 65 for (unsigned int y = 0; y < CURSOR_HEIGHT; ++y) { … … 66 69 pixel_t pixel = (cursor_texture[offset] & (1 << (x % 8))) ? 67 70 PIXEL(255, 0, 0, 0) : PIXEL(255, 255, 255, 255); 68 69 if (visible) 70 surface_put_pixel(surface, x, y, pixel); 71 surface_put_pixel(surface, x, y, visible ? pixel : PIXEL(0, 0, 0, 0)); 71 72 } 72 73 } 73 74 74 75 return surface; 75 76 }
Note:
See TracChangeset
for help on using the changeset viewer.