2009/8/10 Vladimir 'phcoder' Serbinenko <[email protected]>:
> On Mon, Aug 10, 2009 at 4:38 PM, Michal Suchanek<[email protected]> wrote:
>> Yes, but set_viewport works on the active target. You create an
>> offscreen target and set it as the active target and want to set the
>> viewport on it. Depending on its size this function either needlessly
>> limits you to the current screen mode or allows illegal viewport to be
>> set.
>>
>> It simply compares apples and oranges.
>>
> Fixed in repo. New patch is coming after testing
Does not build.
Otherwise it works as expected. I can build a rescue CD with gfxterm
and a lame background image.
Thanks
Michal
diff --git a/video/fb/video_fb.c b/video/fb/video_fb.c
index ac9eb4b..f97d7ac 100644
--- a/video/fb/video_fb.c
+++ b/video/fb/video_fb.c
@@ -160,23 +160,23 @@ grub_video_fb_set_viewport (unsigned int x,
unsigned int y,
{
/* Make sure viewport is withing screen dimensions. If viewport was set
to be out of the region, mark its size as zero. */
- if (x > render_target->mode_info.x_resolution)
+ if (x > render_target->mode_info.width)
{
x = 0;
width = 0;
}
- if (y > render_target->mode_info.y_resolution)
+ if (y > render_target->mode_info.height)
{
y = 0;
height = 0;
}
- if (x + width > render_target->mode_info.x_resolution)
- width = render_target->mode_info.x_resolution - x;
+ if (x + width > render_target->mode_info.width)
+ width = render_target->mode_info.width - x;
- if (y + height > render_target->mode_info.y_resolution)
- height = render_target->mode_info.y_resolution - y;
+ if (y + height > render_target->mode_info.height)
+ height = render_target->mode_info.height - y;
render_target->viewport.x = x;
render_target->viewport.y = y;
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel