[Bug 21159] "Rayman 2": Does not recognize user input

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Aug 17 13:59:15 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=21159

Lucas Fialho Zawacki <lfzawacki at yahoo.com.br> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lfzawacki at yahoo.com.br

--- Comment #11 from Lucas Fialho Zawacki <lfzawacki at yahoo.com.br> 2012-08-17 13:59:15 CDT ---
Ok I think I figured this bug out. The game is looking for the keyboard layout
type in a call for IDirectInput_GetCapabilities (the member dwDevType from
DIDEVCAPS struct) and doesnt like what Wine puts there. Wine classifies it as
DI8DEVTYPEKEYBOARD_UNKNOWN (the value is 0) and the game refuses to recognize
further input after this call.

I've made several tests and it seems any value, but 0, makes input work past
from this point. The documentation for MSDN suggests various values that could
go into this field (see dwDevType remarks here
http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.dideviceinstance%28v=vs.85%29.aspx)
and I imagine native dinput decides one of those values based on the info it
has about the keyboard.

So I see some options for fixing this. The most corret would be to interpret
the values from calls like GetKeyboardLayout and assign a valid dwDevType, but
I don't see how Wine could do this realiably and that's probably why it just
reports UNKNOWN now.

A more pragmatic approach would be to just stick to one single value as being
"the one" keyboard type reported by Wine's dinput. I've tested several Windows
machines, (one XP box, one 7 box and all the VMs in Wine testbot) and they all
reported the value DI8DEVTYPEKEYBOARD_PCENH - my machines were using a pt_BR
locale, by the way. When native dinput.dll is used under Wine it reports
DI8DEVTYPEKEYBOARD_PCXT, probably based in something it infers from the
keyboard the X11 exposes.

I like the pragmatic option best and I'd suggest we stick with reporting
DI8DEVTYPEKEYBOARD_PCENH. We could argue if this would cause regressions,
because now apps that use GetCapabilities would "assume" that this is the
correct layout, but I doubt it would be a serious problem. Again this is a very
common value according to my tests. 

In another note, I discovered bug #28232 is a duplicate of this. The same
modification fixes it too, and they're both Ubisoft games from the same year
hmmm :)

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list