Skip to content

Commit

Permalink
Fix: Skip js devices when enumerating, use evdev stuff only. Ref #2
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Jul 30, 2017
1 parent e6eadd2 commit dbc30fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dumbxinputemu/dinput_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ static BOOL CALLBACK dinput_enum_callback(const DIDEVICEINSTANCEA *instance, voi
LPDIRECTINPUTDEVICE8A device;
HRESULT hr;

if(strstr(instance->tszProductName, "(js)") != NULL)
{
// Skip 'js' devices, use only evdev
return DIENUM_CONTINUE;
}

if (dinput.mapped == sizeof(controllers) / sizeof(*controllers))
return DIENUM_STOP;

Expand Down

0 comments on commit dbc30fe

Please sign in to comment.