Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MbE2j-0005IP-Fq for mharc-grub-devel@gnu.org; Wed, 12 Aug 2009 09:39:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbE2i-0005IK-K6 for grub-devel@gnu.org; Wed, 12 Aug 2009 09:39:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbE2g-0005HX-AJ for grub-devel@gnu.org; Wed, 12 Aug 2009 09:39:03 -0400 Received: from [199.232.76.173] (port=53115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbE2g-0005HO-6t for grub-devel@gnu.org; Wed, 12 Aug 2009 09:39:02 -0400 Received: from mx20.gnu.org ([199.232.41.8]:19582) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbE2e-0002Hi-U2 for grub-devel@gnu.org; Wed, 12 Aug 2009 09:39:01 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbE2b-0003sb-O3 for grub-devel@gnu.org; Wed, 12 Aug 2009 09:38:58 -0400 Received: by fg-out-1718.google.com with SMTP id l27so741557fgb.7 for ; Wed, 12 Aug 2009 06:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=FMkYHJMMlrHpmF55c0+eDAPEGNK/DF1se4HFMH26f4s=; b=pMJkjvetO/Zksiy2W9skluj0dna0kh33TgOihnKnCinr74l4VEff72Zea8+5wLZq2/ dNYETP4MpwsITdBJhujf2rJsNn7+noKB2HIgSr/m74L0zapKsQeK5RvbWAh00a1z8mKX +wt1+xUr/uNVIUPai19Eqws9vfDA6BeD0XnxI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=P9ltvwSO7+0ECEmciOycDX5ed1OkKN+edAcg8gesOzbcPckHJGZ6p1Xz+BTh/54fsw 5x65PsKrnCQ/0xp5sRY+nE61Th3hfZb+9i/GlLUvmHbG8R/cj09kN0B+1F90OlffVqTT FoTVFb2hdFt6HcAUkz9WwhOSaVx58O+MfALYQ= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.163.5 with SMTP id l5mr88555fge.3.1250084335417; Wed, 12 Aug 2009 06:38:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 12 Aug 2009 15:38:55 +0200 X-Google-Sender-Auth: ffdca3cd9f3db689 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: Fwd: [PATCH 1/2] Framebuffer split X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 13:39:04 -0000 2009/8/12 Vladimir 'phcoder' Serbinenko : > On Wed, Aug 12, 2009 at 3:08 PM, Michal Suchanek wrote: >> 2009/8/10 Vladimir 'phcoder' Serbinenko : >>> On Mon, Aug 10, 2009 at 4:38 PM, Michal Suchanek 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) {