Changes in uspace/srv/hid/output/port/ega.c [4122410:bdf06ad] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/output/port/ega.c
r4122410 rbdf06ad 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2011 Martin Decky 3 4 * All rights reserved. … … 31 32 */ 32 33 34 #include <codepage/cp437.h> 33 35 #include <errno.h> 34 36 #include <sysinfo.h> … … 88 90 break; 89 91 case CHAR_ATTR_RGB: 90 attr = (attrs.val.rgb.bgcolor < attrs.val.rgb.fgcolor) ? 91 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); 92 99 break; 93 100 } … … 106 113 { 107 114 uint8_t glyph; 108 109 if (ascii_check(field->ch)) 110 glyph = field->ch;111 else115 errno_t rc; 116 117 rc = cp437_encode(field->ch, &glyph); 118 if (rc != EOK) 112 119 glyph = '?'; 113 120
Note:
See TracChangeset
for help on using the changeset viewer.