grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: [PATCH 1/2] Framebuffer split


From: Michal Suchanek
Subject: Re: Fwd: [PATCH 1/2] Framebuffer split
Date: Wed, 12 Aug 2009 15:08:58 +0200

2009/8/10 Vladimir 'phcoder' Serbinenko <address@hidden>:
> On Mon, Aug 10, 2009 at 4:38 PM, Michal Suchanek<address@hidden> 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]