VESA driver: report the framebuffer width

With this patch, the VESA driver reports the framebuffer width to the
client instead of the visible width  This fixes possible distortion
if these widths differ, at the cost that content in the right-most area
might be invisible in such cases.

Issue #1264.
This commit is contained in:
Christian Prochaska 2014-09-29 15:24:17 +02:00 committed by Christian Helmuth
parent 93f0cde72f
commit 435721ea19

View File

@ -79,16 +79,37 @@ static uint16_t get_vesa_mode(mb_vbe_ctrl_t *ctrl_info, mb_vbe_mode_t *mode_info
((mode_info->x_resolution > width) ||
((mode_info->x_resolution == width) &&
(mode_info->y_resolution > height)))) {
width = mode_info->x_resolution;
/*
* FIXME
*
* The width of a line in the framebuffer can be higher than
* the visible width (for example: visible width 1366,
* framebuffer width 1376). Currently, the framebuffer width
* is reported to the client, which does not know the
* difference and assumes the whole width to be completely
* visible.
*/
width = mode_info->bytes_per_scanline / (mode_info->bits_per_pixel / 8);
height = mode_info->y_resolution;
ret = *MODE_PTR(off);
}
} else {
if (mode_info->x_resolution == width &&
mode_info->y_resolution == height &&
mode_info->bits_per_pixel == depth)
mode_info->bits_per_pixel == depth) {
/*
* FIXME
*
* The width of a line in the framebuffer can be higher than
* the visible width (for example: visible width 1366,
* framebuffer width 1376). Currently, the framebuffer width
* is reported to the client, which does not know the
* difference and assumes the whole width to be completely
* visible.
*/
width = mode_info->bytes_per_scanline / (mode_info->bits_per_pixel / 8);
ret = *MODE_PTR(off);
}
}
}
#undef MODE_PTR