Commit 24f1219c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

If the joydevice is not present, do not create a DirectInputDevice.

parent 38ffcc3c
......@@ -242,7 +242,9 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_JOYSTICK)) {
/* check whether we have a joystick */
#ifdef HAVE_LINUX_22_JOYSTICK_API
if ((access(JOYDEV,O_RDONLY)!=-1) || (errno!=ENODEV)) {
if ( (access(JOYDEV,O_RDONLY)!=-1) ||
(errno!=ENODEV && errno!=ENOENT)
) {
/* Return joystick */
devInstance.guidInstance = GUID_Joystick;
devInstance.guidProduct = DInput_Wine_Joystick_GUID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment