Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1640 → Rev 1639

/uspace/trunk/fb/fb.c
773,11 → 773,7
ipc_answer_fast(iid, 0, 0, 0); /* Accept connection */
 
while (1) {
if (vport->cursor_shown)
callid = async_get_call_timeout(&call,250000);
else
callid = async_get_call(&call);
 
callid = async_get_call_timeout(&call,250000);
if (!callid) {
cursor_blink(vp);
continue;
/uspace/trunk/fb/ega.c
55,11 → 55,6
#define EGA_IO_ADDRESS 0x3d4
#define EGA_IO_SIZE 2
 
#define NORMAL_COLOR 0x0f
#define INVERTED_COLOR 0xf0
 
#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
 
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
72,7 → 67,7
static unsigned int scr_height;
static char *scr_addr;
 
static unsigned int style = NORMAL_COLOR;
static unsigned int style = 0x1e;
 
static inline void outb(u16 port, u8 b)
{
185,7 → 180,10
 
for (i=0; i < scr_width*scr_height; i++) {
scr_addr[i*2] = data[i].character;
scr_addr[i*2+1] = EGA_STYLE(data[i].style.fg_color, data[i].style.bg_color);
if (data[i].style.fg_color > data[i].style.bg_color)
scr_addr[i*2+1] = 0x1e;
else
scr_addr[i*2+1] = 0xe1;
}
}
 
302,7 → 300,10
case FB_SET_STYLE:
fgcolor = IPC_GET_ARG1(call);
bgcolor = IPC_GET_ARG2(call);
style = EGA_STYLE(fgcolor, bgcolor);
if (fgcolor > bgcolor)
style = 0x1e;
else
style = 0xe1;
break;
case FB_VP_DRAW_PIXMAP:
i = IPC_GET_ARG2(call);