Changeset bc52b5b in mainline for uspace/lib/memgfx/src/memgc.c


Ignore:
Timestamp:
2021-08-15T10:02:32Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
99589a9
Parents:
de0c55a
Message:

Allow the use of EGA attributes/24-bit characters alongside RGB

In a big hack (since we cannot have different pixel formats yet) we
use a pixel format that allows both 24-bit RGB (without character)
or 24-bit character with 8-bit attributes. Thus in GFX we cannot
currently have characters with any RGB color, but we can set
foreground and background individually (and it even works in EGA mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/memgfx/src/memgc.c

    rde0c55a rbc52b5b  
    108108        mem_gc_t *mgc = (mem_gc_t *) arg;
    109109        uint16_t r, g, b;
     110        uint8_t attr;
    110111
    111112        gfx_color_get_rgb_i16(color, &r, &g, &b);
    112         mgc->color = PIXEL(0, r >> 8, g >> 8, b >> 8);
     113        gfx_color_get_ega(color, &attr);
     114        mgc->color = PIXEL(attr, r >> 8, g >> 8, b >> 8);
    113115        return EOK;
    114116}
Note: See TracChangeset for help on using the changeset viewer.