GSoC: dinput8 Action Mapping
Marcus Meissner
marcus at jet.franken.de
Tue Jun 14 05:52:41 CDT 2011
On Mon, Jun 13, 2011 at 07:17:04PM -0300, Lucas Zawacki wrote:
> OK, so here is my second try at some patches. These mostly implement
> keyboard action mapping and there's plenty of tests to go together
> with it. I believe the keyboard part is pretty much done, as is
> SetActionMap. Of course I'm ignoring the username strings and all the
> device ownership part, I'll leave that for later.
>
> As before I'll leave the patches here to get some feedback before I
> try to commit.
Looks good to me. I spotted one small flaw in binary logic:
> +/* This is used for the action mapping of constants such as DIKEYBOARD_SPACE */
> +static DWORD keyboard_semantic_to_obj_id(DWORD dwSemantic)
> +{
> + /* dwSemantic=810004df is dwObjID=0xdf04 */
> + return 0x0000ffff & ( (dwSemantic << 8) | (dwSemantic >> 8) );
> +}
The >>8 shift will drag in bits 16-23 from dwSemantic, which is probably not intended.
(think dwSemantic = 0x4242df04 , it will roate in the 0x42)
dwSemantic &= 0x0000ffff;
before the operation will help.
If no negative comments appear, please post them as 1 patch per email to wine-patches ;)
Ciao, Marcus
More information about the wine-devel
mailing list