Rev 3755 | Rev 3908 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3755 | Rev 3767 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | #include <ipc/fb.h> |
47 | #include <ipc/fb.h> |
48 | #include <ipc/ipc.h> |
48 | #include <ipc/ipc.h> |
49 | #include <ipc/ns.h> |
49 | #include <ipc/ns.h> |
50 | #include <ipc/services.h> |
50 | #include <ipc/services.h> |
51 | #include <libarch/ddi.h> |
51 | #include <libarch/ddi.h> |
- | 52 | #include <console/style.h> |
|
- | 53 | #include <console/color.h> |
|
52 | 54 | ||
53 | #include "ega.h" |
55 | #include "ega.h" |
54 | #include "../console/screenbuffer.h" |
56 | #include "../console/screenbuffer.h" |
55 | #include "main.h" |
57 | #include "main.h" |
56 | 58 | ||
Line 152... | Line 154... | ||
152 | { |
154 | { |
153 | int i; |
155 | int i; |
154 | 156 | ||
155 | for (i = 0; i < scr_width * scr_height; i++) { |
157 | for (i = 0; i < scr_width * scr_height; i++) { |
156 | scr_addr[i * 2] = data[i].character; |
158 | scr_addr[i * 2] = data[i].character; |
- | 159 | /* FIXME |
|
157 | scr_addr[i * 2 + 1] = EGA_STYLE(data[i].style.fg_color, |
160 | scr_addr[i * 2 + 1] = EGA_STYLE(data[i].style.fg_color, |
158 | data[i].style.bg_color); |
161 | data[i].style.bg_color); |
- | 162 | */ |
|
159 | } |
163 | } |
160 | } |
164 | } |
161 | 165 | ||
162 | static int save_screen(void) |
166 | static int save_screen(void) |
163 | { |
167 | { |
Line 273... | Line 277... | ||
273 | else |
277 | else |
274 | cursor_disable(); |
278 | cursor_disable(); |
275 | retval = 0; |
279 | retval = 0; |
276 | break; |
280 | break; |
277 | case FB_SET_STYLE: |
281 | case FB_SET_STYLE: |
- | 282 | retval = 0; |
|
- | 283 | switch (IPC_GET_ARG1(call)) { |
|
- | 284 | case STYLE_NORMAL: style = INVERTED_COLOR; break; |
|
- | 285 | case STYLE_EMPHASIS: style = INVERTED_COLOR | 4; break; |
|
- | 286 | default: retval = EINVAL; |
|
- | 287 | } |
|
- | 288 | break; |
|
- | 289 | case FB_SET_COLOR: |
|
- | 290 | fgcolor = IPC_GET_ARG1(call); |
|
- | 291 | bgcolor = IPC_GET_ARG2(call); |
|
- | 292 | style = (fgcolor & 7) | ((bgcolor & 7) << 4); |
|
- | 293 | if (IPC_GET_ARG3(call) & CATTR_BRIGHT) |
|
- | 294 | style = style | 0x08; |
|
- | 295 | retval = 0; |
|
- | 296 | break; |
|
- | 297 | case FB_SET_RGB_COLOR: |
|
278 | fgcolor = IPC_GET_ARG1(call); |
298 | fgcolor = IPC_GET_ARG1(call); |
279 | bgcolor = IPC_GET_ARG2(call); |
299 | bgcolor = IPC_GET_ARG2(call); |
280 | style = EGA_STYLE(fgcolor, bgcolor); |
300 | style = EGA_STYLE(fgcolor, bgcolor); |
281 | retval = 0; |
301 | retval = 0; |
282 | break; |
302 | break; |