Changeset a35b458 in mainline for uspace/lib/draw/cursor/embedded.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/cursor/embedded.c
r3061bc1 ra35b458 47 47 assert(state_count); 48 48 assert(data); 49 49 50 50 (*state_count) = 1; 51 51 (*data) = NULL; … … 56 56 if (state != 0) 57 57 return NULL; 58 58 59 59 surface_t *surface = surface_create(CURSOR_WIDTH, CURSOR_HEIGHT, NULL, 0); 60 60 if (!surface) 61 61 return NULL; 62 62 63 63 for (unsigned int y = 0; y < CURSOR_HEIGHT; ++y) { 64 64 for (unsigned int x = 0; x < CURSOR_WIDTH; ++x) { … … 67 67 pixel_t pixel = (cursor_texture[offset] & (1 << (x % 8))) ? 68 68 PIXEL(255, 0, 0, 0) : PIXEL(255, 255, 255, 255); 69 69 70 70 if (visible) 71 71 surface_put_pixel(surface, x, y, pixel); 72 72 } 73 73 } 74 74 75 75 return surface; 76 76 }
Note:
See TracChangeset
for help on using the changeset viewer.