mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-04 00:36:01 +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_GAS) ||
|
||||||
libevdev_has_event_code(evdev, EV_ABS, ABS_BRAKE));
|
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) {
|
if (is_accelerometer) {
|
||||||
libevdev_free(evdev);
|
libevdev_free(evdev);
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
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;
|
int dev = numDevices;
|
||||||
numDevices++;
|
numDevices++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user