* This fixes VGA mode frame buffer use, no idea when this got broken. It might

be broken in the app_server now, but I haven't checked yet.
* Fixed typo in vesa.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32141 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-08-05 17:24:23 +00:00
parent 0ac197fcfd
commit 13247f3a8c
3 changed files with 8 additions and 7 deletions

View File

@ -44,7 +44,7 @@ struct vbe_mode_info {
uint16 attributes;
uint8 window_a_attributes;
uint8 window_b_attributes;
uint16 window_granulatiry;
uint16 window_granularity;
uint16 window_size;
uint16 window_a_segment;
uint16 window_b_segment;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004-2008, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2008, Stephan Aßmus <superstippi@gmx.de>
* Copyright 2008, Philippe Saint-Pierre <stpere@gmail.com>
* Distributed under the terms of the MIT License.
@ -1007,7 +1007,7 @@ fallback:
gKernelArgs.frame_buffer.width = 640;
gKernelArgs.frame_buffer.height = 480;
gKernelArgs.frame_buffer.bytes_per_row = 640 / 2;
gKernelArgs.frame_buffer.bytes_per_row = 80;
gKernelArgs.frame_buffer.depth = 4;
gKernelArgs.frame_buffer.physical_buffer.size
= gKernelArgs.frame_buffer.width

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
@ -142,8 +142,8 @@ render_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
} else {
// monochrome mode
uint8 *base = (uint8 *)(sConsole.frame_buffer + sConsole.bytes_per_row * y * CHAR_HEIGHT
+ x * CHAR_WIDTH / 8);
uint8 *base = (uint8 *)(sConsole.frame_buffer
+ sConsole.bytes_per_row * y * CHAR_HEIGHT + x * CHAR_WIDTH / 8);
uint8 baseOffset = (x * CHAR_WIDTH) & 0x7;
for (y = 0; y < CHAR_HEIGHT; y++) {
@ -415,7 +415,8 @@ frame_buffer_console_init(kernel_args *args)
if (args->frame_buffer.depth == 4) {
// VGA mode will be treated as monochrome
args->frame_buffer.bytes_per_row /= 8;
// (ie. only the first plane will be used)
args->frame_buffer.depth = 1;
}
frame_buffer_update((addr_t)frameBuffer, args->frame_buffer.width,