mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
If the joydevice is not present, do not create a DirectInputDevice.
This commit is contained in:
parent
38ffcc3cb0
commit
24f1219c56
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue