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


Ignore:
Timestamp:
2014-03-15T19:21:53Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c773adc
Parents:
2034f98 (diff), 8cffdf5 (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:

Merge mainline changes

File:
1 edited

Legend:

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

    r2034f98 rb0b4592e  
    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.