Changeset 34aad53d in mainline for uspace/srv/hid/output/port/ega.c


Ignore:
Timestamp:
2024-04-07T09:45:45Z (13 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
c37c24c
Parents:
e4cc266 (diff), 522eecf (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 master to topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/output/port/ega.c

    re4cc266 r34aad53d  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * Copyright (c) 2011 Martin Decky
    44 * All rights reserved.
     
    9090                break;
    9191        case CHAR_ATTR_RGB:
    92                 attr = (attrs.val.rgb.bgcolor < attrs.val.rgb.fgcolor) ?
    93                     ega.style_inverted : ega.style_normal;
     92                attr =
     93                    ((RED(attrs.val.rgb.fgcolor) >= 0x80) ? 0x40 : 0) |
     94                    ((GREEN(attrs.val.rgb.fgcolor) >= 0x80) ? 0x20 : 0) |
     95                    ((BLUE(attrs.val.rgb.fgcolor) >= 0x80) ? 0x10 : 0) |
     96                    ((RED(attrs.val.rgb.bgcolor) >= 0x80) ? 0x04 : 0) |
     97                    ((GREEN(attrs.val.rgb.bgcolor) >= 0x80) ? 0x02 : 0) |
     98                    ((BLUE(attrs.val.rgb.bgcolor) >= 0x80) ? 0x01 : 0);
    9499                break;
    95100        }
Note: See TracChangeset for help on using the changeset viewer.