[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch] factor out commonly used scancode translation t
Re: [Qemu-devel] [patch] factor out commonly used scancode translation table
Thu, 4 Jan 2007 19:52:09 +0100
On Thu, Jan 04, 2007 at 06:10:30PM +0000, Thiemo Seufer wrote:
>Bernhard Fischer wrote:
>> On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote:
>> >Bernhard Fischer wrote:
>> >>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 ¹).
>> >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.
New patch with a public accessor is attached. Couldn't think of a better
name, please feel free to change it..
Description: Text Data