Commit Graph

5 Commits

Author SHA1 Message Date
Szymon Janc
61745d2bb8 sixaxis: Fix Bluetooth PS3 clone joypad being named like the original
When cable pairing a PS3 clone device, we should try and keep the USB device
name to create a new btd_device so that the joypad is named after its USB name
when connecting through Bluetooth.

If that isn't done, "Shanwan" clone joypads are named like the genuine joypads, and
kernel Bluetooth quirks aren't applied.

gh-issue: https://github.com/bluez/bluez/issues/46
2021-02-22 09:22:59 +01:00
Tedd Ho-Jeong An
e59926d762 profiles: Add SPDX License Identifier
This patch adds SPDX License Identifier and removes the license text.

-------------------------------------
       License            COUNT
-------------------------------------
 GPL-2.0-or-later     :     72
 LGPL-2.1-or-later    :      6

License: GPL-2.0-or-later
   profiles/deviceinfo/dis.c
   profiles/deviceinfo/deviceinfo.c
   profiles/health/hdp_types.h
   profiles/health/mcap.c
   profiles/health/hdp_manager.c
   profiles/health/hdp_main.c
   profiles/health/mcap.h
   profiles/health/hdp_util.h
   profiles/health/hdp_manager.h
   profiles/health/hdp_util.c
   profiles/health/hdp.c
   profiles/health/hdp.h
   profiles/network/server.c
   profiles/network/connection.h
   profiles/network/connection.c
   profiles/network/manager.c
   profiles/network/bnep.c
   profiles/network/server.h
   profiles/network/bnep.h
   profiles/battery/battery.c
   profiles/cups/cups.h
   profiles/cups/sdp.c
   profiles/cups/main.c
   profiles/cups/spp.c
   profiles/cups/hcrp.c
   profiles/scanparam/scpp.c
   profiles/scanparam/scan.c
   profiles/audio/transport.h
   profiles/audio/avdtp.h
   profiles/audio/source.c
   profiles/audio/player.c
   profiles/audio/avctp.c
   profiles/audio/control.h
   profiles/audio/a2dp.c
   profiles/audio/source.h
   profiles/audio/transport.c
   profiles/audio/sink.c
   profiles/audio/avrcp.h
   profiles/audio/avdtp.c
   profiles/audio/a2dp.h
   profiles/audio/avrcp.c
   profiles/audio/media.h
   profiles/audio/avctp.h
   profiles/audio/control.c
   profiles/audio/sink.h
   profiles/audio/player.h
   profiles/audio/media.c
   profiles/sap/server.c
   profiles/sap/sap-dummy.c
   profiles/sap/main.c
   profiles/sap/sap.h
   profiles/sap/manager.c
   profiles/sap/server.h
   profiles/sap/manager.h
   profiles/iap/main.c
   profiles/gap/gas.c
   profiles/midi/midi.c
   profiles/midi/libmidi.c
   profiles/midi/libmidi.h
   profiles/input/server.c
   profiles/input/suspend.h
   profiles/input/uhid_copy.h
   profiles/input/device.c
   profiles/input/hog.c
   profiles/input/device.h
   profiles/input/hidp_defs.h
   profiles/input/manager.c
   profiles/input/suspend-none.c
   profiles/input/sixaxis.h
   profiles/input/hog-lib.c
   profiles/input/suspend-dummy.c
   profiles/input/server.h

License: LGPL-2.1-or-later
   profiles/deviceinfo/dis.h
   profiles/battery/bas.h
   profiles/battery/bas.c
   profiles/scanparam/scpp.h
   profiles/audio/a2dp-codecs.h
   profiles/input/hog-lib.h
2020-09-21 16:19:36 -07:00
Luiz Augusto von Dentz
6c467e923b sixaxis: Fix compilation and various coding style issues
This fixes the following problems:

plugins/sixaxis.c:443:7: error: ‘version’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (!setup_device(fd, sysfs_path, name, source, vid, pid, version, type, adapter))
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plugins/sixaxis.c:409:34: note: ‘version’ was declared here
  uint16_t bus, vid, pid, source, version;
                                  ^~~~~~~
plugins/sixaxis.c:443:7: error: ‘source’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (!setup_device(fd, sysfs_path, name, source, vid, pid, version, type, adapter))
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plugins/sixaxis.c:409:26: note: ‘source’ was declared here
  uint16_t bus, vid, pid, source, version;
                          ^~~~~~
cc1: all warnings being treated as errors

And many instances of code going over 80 columns.
2017-10-27 13:42:33 +03:00
Bastien Nocera
5832b01a30 profiles/input: Add DS4 devices to the shared header
And simplify the detection code in server.c some more.
2017-10-27 09:58:06 +02:00
Bastien Nocera
bbc99b7d7f plugins/sixaxis: Move device discovery to shared header
Move the struct containing the Sixaxis-compatible devices to a
header shared with the input profiles code, so as to reduce device
declaration.

Adding support for new devices should be as easy as adding the device's
declaration in profiles/input/sixaxis.h
2017-10-27 09:58:06 +02:00