Rev 4537 | Rev 4678 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4537 | Rev 4668 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | #include <io/color.h> |
54 | #include <io/color.h> |
55 | #include <io/style.h> |
55 | #include <io/style.h> |
56 | #include <async.h> |
56 | #include <async.h> |
57 | #include <fibril.h> |
57 | #include <fibril.h> |
58 | #include <bool.h> |
58 | #include <bool.h> |
- | 59 | #include <stdio.h> |
|
59 | 60 | ||
60 | #include "font-8x16.h" |
61 | #include "font-8x16.h" |
61 | #include "fb.h" |
62 | #include "fb.h" |
62 | #include "main.h" |
63 | #include "main.h" |
63 | #include "../console/screenbuffer.h" |
64 | #include "../console/screenbuffer.h" |
Line 448... | Line 449... | ||
448 | 449 | ||
449 | y = vport->y; |
450 | y = vport->y; |
450 | for (row = 0; row < vport->rows; row++) { |
451 | for (row = 0; row < vport->rows; row++) { |
451 | x = vport->x; |
452 | x = vport->x; |
452 | for (col = 0; col < vport->cols; col++) { |
453 | for (col = 0; col < vport->cols; col++) { |
- | 454 | if (((int) row + lines >= 0) && |
|
453 | if ((row + lines >= 0) && (row + lines < vport->rows)) { |
455 | ((int) row + lines < (int) vport->rows)) { |
454 | xbp = &vport->backbuf[BB_POS(vport, col, row + lines)]; |
456 | xbp = &vport->backbuf[BB_POS(vport, col, row + lines)]; |
455 | bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
457 | bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
456 | 458 | ||
457 | glyph = xbp->glyph; |
459 | glyph = xbp->glyph; |
458 | fg_color = xbp->fg_color; |
460 | fg_color = xbp->fg_color; |
Line 1064... | Line 1066... | ||
1064 | case IPC_M_SHARE_OUT: |
1066 | case IPC_M_SHARE_OUT: |
1065 | /* We accept one area for data interchange */ |
1067 | /* We accept one area for data interchange */ |
1066 | if (IPC_GET_ARG1(*call) == shm_id) { |
1068 | if (IPC_GET_ARG1(*call) == shm_id) { |
1067 | void *dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
1069 | void *dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
1068 | shm_size = IPC_GET_ARG2(*call); |
1070 | shm_size = IPC_GET_ARG2(*call); |
1069 | if (!ipc_answer_1(callid, EOK, (sysarg_t) dest)) |
1071 | if (ipc_answer_1(callid, EOK, (sysarg_t) dest)) { |
1070 | shm = dest; |
- | |
1071 | else |
- | |
1072 | shm_id = 0; |
1072 | shm_id = 0; |
- | 1073 | return false; |
|
- | 1074 | } |
|
- | 1075 | shm = dest; |
|
1073 | 1076 | ||
1074 | if (shm[0] != 'P') |
1077 | if (shm[0] != 'P') |
1075 | return false; |
1078 | return false; |
1076 | 1079 | ||
1077 | return true; |
1080 | return true; |
Line 1642... | Line 1645... | ||
1642 | retval = EOK; |
1645 | retval = EOK; |
1643 | break; |
1646 | break; |
1644 | case FB_GET_CSIZE: |
1647 | case FB_GET_CSIZE: |
1645 | ipc_answer_2(callid, EOK, vport->cols, vport->rows); |
1648 | ipc_answer_2(callid, EOK, vport->cols, vport->rows); |
1646 | continue; |
1649 | continue; |
- | 1650 | case FB_GET_COLOR_CAP: |
|
- | 1651 | ipc_answer_1(callid, EOK, FB_CCAP_RGB); |
|
- | 1652 | continue; |
|
1647 | case FB_SCROLL: |
1653 | case FB_SCROLL: |
1648 | scroll = IPC_GET_ARG1(call); |
1654 | scroll = IPC_GET_ARG1(call); |
1649 | if ((scroll > (int) vport->rows) || (scroll < (-(int) vport->rows))) { |
1655 | if ((scroll > (int) vport->rows) || (scroll < (-(int) vport->rows))) { |
1650 | retval = EINVAL; |
1656 | retval = EINVAL; |
1651 | break; |
1657 | break; |