- Timestamp:
- 2006-06-07T10:06:00Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e8d77a4
- Parents:
- 9e951acb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/ega.c
r9e951acb rd3f2cad 56 56 #define EGA_IO_SIZE 2 57 57 58 #define NORMAL_COLOR 0x0f 59 #define INVERTED_COLOR 0xf0 60 61 #define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR) 62 58 63 typedef unsigned char u8; 59 64 typedef unsigned short u16; … … 68 73 static char *scr_addr; 69 74 70 static unsigned int style = 0x1e;75 static unsigned int style = NORMAL_COLOR; 71 76 72 77 static inline void outb(u16 port, u8 b) … … 181 186 for (i=0; i < scr_width*scr_height; i++) { 182 187 scr_addr[i*2] = data[i].character; 183 if (data[i].style.fg_color > data[i].style.bg_color) 184 scr_addr[i*2+1] = 0x1e; 185 else 186 scr_addr[i*2+1] = 0xe1; 188 scr_addr[i*2+1] = EGA_STYLE(data[i].style.fg_color, data[i].style.bg_color); 187 189 } 188 190 } … … 301 303 fgcolor = IPC_GET_ARG1(call); 302 304 bgcolor = IPC_GET_ARG2(call); 303 if (fgcolor > bgcolor) 304 style = 0x1e; 305 else 306 style = 0xe1; 305 style = EGA_STYLE(fgcolor, bgcolor); 307 306 break; 308 307 case FB_VP_DRAW_PIXMAP:
Note:
See TracChangeset
for help on using the changeset viewer.