From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdHZ-0000ZJ-5V for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:49:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmdHU-0001Mt-3K for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:49:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdHT-0001Mp-Ti for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:48:56 -0400 Message-ID: <1444895333.24283.7.camel@redhat.com> From: Gerd Hoffmann Date: Thu, 15 Oct 2015 09:48:53 +0200 In-Reply-To: <87y4f56lzu.fsf@mail.parknet.co.jp> References: <87k2qp8yxv.fsf@mail.parknet.co.jp> <87fv1d8ywp.fsf@mail.parknet.co.jp> <87bnc18yvw.fsf_-_@mail.parknet.co.jp> <1444837495.4467.29.camel@redhat.com> <87y4f56lzu.fsf@mail.parknet.co.jp> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: OGAWA Hirofumi Cc: qemu-devel@nongnu.org On Do, 2015-10-15 at 08:58 +0900, OGAWA Hirofumi wrote: > Gerd Hoffmann writes: > > > On Mi, 2015-10-14 at 20:37 +0900, OGAWA Hirofumi wrote: > >> This converts vga code to curses code in console_write_bh(). > >> > >> With this changes, we can see line graphics (for example, dialog uses) > >> correctly. > > > > But it breaks line graphics in vga text mode on gtk I suspect? > > vga_to_curses[] is filled by curses_setup(). So if no -curses option, I > think it should have no change to behavior. (BTW, there is no common > section like kernel in qemu build, right? i.e. no need initializer to > global value.) Ok, curses and gtk can't be active at the same time. But for curses and vnc it is possible (qemu -curses -vnc :$display), and you probably get a dissorted vga text mode over vnc then. I think the mapping should happen in the curses code, when curses updates the screen. curses_update() function is probably the best place for it. Also you don't need a init function, you can simply init the array with c99 initializers: chtype vga_to_curses[256] = { [0x04] = ACS_DIAMOND, [ ... ] };