[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch] factor out commonly used scancode translation t
From: |
Thiemo Seufer |
Subject: |
Re: [Qemu-devel] [patch] factor out commonly used scancode translation table |
Date: |
Thu, 4 Jan 2007 18:10:30 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Bernhard Fischer wrote:
> On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote:
> >Bernhard Fischer wrote:
> >>Hi,
> >>
> >>The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
> >>an x_keycode.c. This struct is also used by the GGI backend (that is not
> >>yet merged ยน).
> >>
> >>Comments?
> >>
> >How it is done right now, each time x_keycode.c is included, you will
> >end up with an extra copy in the final executable. Perhaps that simply
> >keeping the LUT in sdl.c but removing the 'static' keyword from it and
> >creating a sdl.h file with the statement:
>
> Yes, or create one public accessor func (_translate_keycode() or the
> like). I don't have SDL installed, so only have the LUT once, but you're
> of course right.
>
> What's the preferred method? public LUT or public accessor?
Public accessor, I'd say. Keystroke processing isn't performance critical.
Thiemo