Changeset 66be0288 in mainline for uspace/lib/draw/cursor/embedded.c


Ignore:
Timestamp:
2014-01-17T17:02:59Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
476f62c, facc34d
Parents:
2e80321 (diff), 61b5b73d (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.
Message:

Mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/cursor/embedded.c

    r2e80321 r66be0288  
    4646        assert(state_count);
    4747        assert(data);
    48 
     48       
    4949        (*state_count) = 1;
    5050        (*data) = NULL;
     
    5353static surface_t *cde_render(uint8_t state)
    5454{
    55         if (state != 0) {
     55        if (state != 0)
    5656                return NULL;
    57         }
    58 
     57       
    5958        surface_t *surface = surface_create(CURSOR_WIDTH, CURSOR_HEIGHT, NULL, 0);
    60 
    61         if (!surface) {
     59        if (!surface)
    6260                return NULL;
    63         }
    6461       
    6562        for (unsigned int y = 0; y < CURSOR_HEIGHT; ++y) {
     
    6966                        pixel_t pixel = (cursor_texture[offset] & (1 << (x % 8))) ?
    7067                            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);
    7271                }
    7372        }
    74 
     73       
    7574        return surface;
    7675}
Note: See TracChangeset for help on using the changeset viewer.