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