mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-03 08:15:34 +00:00
Avoid mapping PS4 trackpad as a gamepad
This commit is contained in:
parent
836e61b7c3
commit
663e4b4b7a
@ -655,20 +655,25 @@ void evdev_create(const char* device, struct mapping* mappings, bool verbose, in
|
||||
libevdev_has_event_code(evdev, EV_ABS, ABS_GAS) ||
|
||||
libevdev_has_event_code(evdev, EV_ABS, ABS_BRAKE));
|
||||
|
||||
if (mappings == NULL && is_gamepad) {
|
||||
fprintf(stderr, "No mapping available for %s (%s) on %s\n", name, str_guid, device);
|
||||
mappings = default_mapping;
|
||||
}
|
||||
|
||||
if (is_gamepad)
|
||||
evdev_gamepads++;
|
||||
|
||||
if (is_accelerometer) {
|
||||
libevdev_free(evdev);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_gamepad) {
|
||||
evdev_gamepads++;
|
||||
|
||||
if (mappings == NULL) {
|
||||
fprintf(stderr, "No mapping available for %s (%s) on %s\n", name, str_guid, device);
|
||||
mappings = default_mapping;
|
||||
}
|
||||
} else {
|
||||
if (verbose)
|
||||
printf("Not mapping %s as a gamepad\n", name);
|
||||
mappings = NULL;
|
||||
}
|
||||
|
||||
int dev = numDevices;
|
||||
numDevices++;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user