Changeset 19b3cc6 in mainline for uspace/lib/draw/cursor/embedded.c
- Timestamp:
- 2014-01-17T23:12:10Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e26a9d95
- Parents:
- fddffb2 (diff), facc34d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/cursor/embedded.c
rfddffb2 r19b3cc6 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.