qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch] factor out commonly used scancode translation t


From: Bernhard Fischer
Subject: Re: [Qemu-devel] [patch] factor out commonly used scancode translation table
Date: Thu, 4 Jan 2007 19:52:09 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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:
>> >>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.

New patch with a public accessor is attached. Couldn't think of a better
name, please feel free to change it..

thanks,

Attachment: qemu.cvs.20070104.commonly_used_x_keycode.02.diff
Description: Text Data


reply via email to

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