https://bugs.winehq.org/show_bug.cgi?id=40658
otty@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.9.9 |3.13
--- Comment #9 from otty@gmx.net --- Additional Question: what is the GUID of the AV8R joystick device - in the BoBII game it seems the joystick axes can be assigned based on the joystick GUID?
In the log it seems that mouse, keyboard, etc. get the same GUID 9e573ed9-7734-0000-8d4a-23903fb6bdf7, while each joystick axis gets a separate GUID:
0009:trace:dinput:find_joystick_devices Found a joystick on /dev/input/js0: Saitek AV8R Joystick (js) with 7 axes and 14 buttons 0009:trace:dinput:fill_joystick_dideviceinstanceW 1100 0x33e7b0 0009:trace:dinput:joydev_enum_deviceW Enumerating the linux Joystick device: /dev/input/js0 (Saitek AV8R Joystick (js)) 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices (this=0x16c5d8,0x0004 'DI8DEVCLASS_GAMECTRL',0x7d83a310,0x7d85bb40,0x0001) 0009:trace:dinput:_dump_EnumDevices_dwFlags flags: DIEDFL_ATTACHEDONLY 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 0 ('Wine mouse driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 0 ('Wine mouse driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 1 ('Wine keyboard driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 1 ('Wine keyboard driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 2 ('Wine Linux-input joystick driver') 0009:trace:dinput:IDirectInputWImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver') 0009:trace:dinput:fill_joystick_dideviceinstanceW 1100 0x33e7b0 0009:trace:dinput:joydev_enum_deviceW Enumerating the linux Joystick device: /dev/input/js0 (Saitek AV8R Joystick (js)) 0009:trace:dinput:IDirectInput7WImpl_CreateDeviceEx (0x16c5d8)->({9e573ed9-7734-0000-8d4a-23903fb6bdf7}, (null), 0x16c9c8, (nil)) 0009:trace:dinput:mousedev_create_device 0x16c5d8 {9e573ed9-7734-0000-8d4a-23903fb6bdf7} (null) 0x16c9c8 1 0009:trace:dinput:keyboarddev_create_device 0x16c5d8 {9e573ed9-7734-0000-8d4a-23903fb6bdf7} (null) 0x16c9c8 1 0009:trace:dinput:joydev_create_device 0x16c5d8 {9e573ed9-7734-0000-8d4a-23903fb6bdf7} (null) 0x16c9c8 1 0009:trace:dinput:joydev_create_device 0x16c5d8 {9e573ed9-7734-0000-8d4a-23903fb6bdf7} (null) 0x16c9c8 1 0009:trace:dinput:alloc_device {9e573ed9-7734-0000-8d4a-23903fb6bdf7} 0x16c5d8 0x33e58c 0 0009:trace:dinput:setup_dinput_options "Saitek AV8R Joystick (js)" = "X,Y,Z,Rz,Rx,POV1" 0009:trace:dinput:IDirectInputAImpl_AddRef (0x16c5d8) incrementing from 1 0009:trace:dinput:fill_joystick_dideviceinstanceW 1100 0x33e0e0 0009:trace:dinput:_dump_DIDATAFORMAT Dumping DIDATAFORMAT structure: 0009:trace:dinput:_dump_DIDATAFORMAT - dwSize: 24 0009:trace:dinput:_dump_DIDATAFORMAT - dwObjsize: 16 0009:trace:dinput:_dump_DIDATAFORMAT - dwFlags: 0x00000001 (DIDF_ABSAXIS) 0009:trace:dinput:_dump_DIDATAFORMAT - dwDataSize: 272 0009:trace:dinput:_dump_DIDATAFORMAT - dwNumObjs: 20 0009:trace:dinput:_dump_DIDATAFORMAT - Object 0: 0009:trace:dinput:_dump_DIDATAFORMAT * GUID: {a36d02e0-c9f3-11cf-bfc7-444553540000} ('GUID_XAxis') 0009:trace:dinput:_dump_DIDATAFORMAT * dwOfs: 0 0009:trace:dinput:_dump_DIDATAFORMAT * dwType: 0x00000002 0009:trace:dinput:_dump_DIDATAFORMAT Type: DIDFT_ABSAXIS / Instance: 0 0009:trace:dinput:_dump_DIDATAFORMAT * dwFlags: 0x00000000 0009:trace:dinput:_dump_DIDATAFORMAT 0009:trace:dinput:_dump_DIDATAFORMAT - Object 1: 0009:trace:dinput:_dump_DIDATAFORMAT * GUID: {a36d02e1-c9f3-11cf-bfc7-444553540000} ('GUID_YAxis') 0009:trace:dinput:_dump_DIDATAFORMAT * dwOfs: 4 0009:trace:dinput:_dump_DIDATAFORMAT * dwType: 0x00000102 0009:trace:dinput:_dump_DIDATAFORMAT Type: DIDFT_ABSAXIS / Instance: 1 0009:trace:dinput:_dump_DIDATAFORMAT * dwFlags: 0x00000000 0009:trace:dinput:_dump_DIDATAFORMAT
In dlls/dinput/joystick_linux.c it looks as if the GUID is fixed for all joystick types:
static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903fb6bdf7 */ 0x9e573ed9, 0x7734, 0x11d2, {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} };