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:38:55 +0200

2009/8/12 Vladimir 'phcoder' Serbinenko <address@hidden>:
> On Wed, Aug 12, 2009 at 3:08 PM, Michal Suchanek<address@hidden> wrote:
>> 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.
>>
> Thank you for testing (unfortunately I didn't come to this yet). Your
> fix is applied to my repo

There is the same broken code (although unused) in master/util/sdl.c

Thanks

Michal


diff --git a/util/sdl.c b/util/sdl.c
index 3d0a637..72abac5 100644
--- a/util/sdl.c
+++ b/util/sdl.c
@@ -165,32 +165,6 @@ grub_video_sdl_set_palette (unsigned int start,
unsigned int count,
   return grub_video_fb_set_palette (start, count, palette_data);
 }

-grub_err_t
-grub_video_sdl_set_viewport (unsigned int x, unsigned int y,
-                            unsigned int width, unsigned int height)
-{
-  /* Make sure viewport is withing screen dimensions.  If viewport was set
-     to be out of the region, mark its size as zero.  */
-  if (x > (unsigned) window->w)
-    {
-      x = 0;
-      width = 0;
-    }
-
-  if (y > (unsigned) window->h)
-    {
-      y = 0;
-      height = 0;
-    }
-
-  if (x + width > (unsigned) window->w)
-    width = window->w - x;
-
-  if (y + height > (unsigned) window->h)
-    height = window->h - y;
-  return grub_video_fb_set_viewport (x, y, width, height);
-}
-
 static grub_err_t
 grub_video_sdl_swap_buffers (void)
 {




reply via email to

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