Rev 4055 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4055 | Rev 4156 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | uint16_t vesa_width; |
54 | uint16_t vesa_width; |
55 | uint16_t vesa_height; |
55 | uint16_t vesa_height; |
56 | uint16_t vesa_bpp; |
56 | uint16_t vesa_bpp; |
57 | uint16_t vesa_scanline; |
57 | uint16_t vesa_scanline; |
58 | 58 | ||
- | 59 | uint8_t vesa_red_mask; |
|
- | 60 | uint8_t vesa_red_pos; |
|
- | 61 | ||
- | 62 | uint8_t vesa_green_mask; |
|
- | 63 | uint8_t vesa_green_pos; |
|
- | 64 | ||
- | 65 | uint8_t vesa_blue_mask; |
|
- | 66 | uint8_t vesa_blue_pos; |
|
- | 67 | ||
59 | int vesa_present(void) |
68 | int vesa_present(void) |
60 | { |
69 | { |
61 | if (vesa_width != 0xffff) |
- | |
62 | return true; |
- | |
63 | if (vesa_height != 0xffff) |
70 | if ((vesa_width != 0xffff) && (vesa_height != 0xffff)) |
64 | return true; |
71 | return true; |
- | 72 | ||
65 | return false; |
73 | return false; |
66 | } |
74 | } |
67 | 75 | ||
68 | void vesa_init(void) |
76 | void vesa_init(void) |
69 | { |
77 | { |
Line 72... | Line 80... | ||
72 | switch (vesa_bpp) { |
80 | switch (vesa_bpp) { |
73 | case 8: |
81 | case 8: |
74 | visual = VISUAL_INDIRECT_8; |
82 | visual = VISUAL_INDIRECT_8; |
75 | break; |
83 | break; |
76 | case 16: |
84 | case 16: |
- | 85 | if ((vesa_red_mask == 5) && (vesa_red_pos == 10) |
|
- | 86 | && (vesa_green_mask == 5) && (vesa_green_pos == 5) |
|
- | 87 | && (vesa_blue_mask == 5) && (vesa_blue_pos == 0)) |
|
- | 88 | visual = VISUAL_RGB_5_5_5; |
|
- | 89 | else |
|
77 | visual = VISUAL_RGB_5_6_5; |
90 | visual = VISUAL_RGB_5_6_5; |
78 | break; |
91 | break; |
79 | case 24: |
92 | case 24: |
80 | visual = VISUAL_RGB_8_8_8; |
93 | visual = VISUAL_RGB_8_8_8; |
81 | break; |
94 | break; |
82 | case 32: |
95 | case 32: |