Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c607fb8d authored by Antonio Ospite's avatar Antonio Ospite Committed by Jiri Kosina
Browse files

HID: sony: Always override the Sixaxis descriptor



Simplify the logic of overriding the Sixaxis HID descriptor, this will
make it easier to amend the descriptor in future commits.

The current code does this:

	if (original sixaxis via USB or BT)
		fixup only a part of the descriptor
	else if (sixaxis compatible controller)
		override the _whole_ descriptor

but the end result is exactly the same, except for the trailing zero in
the case of original BT controllers.

So let's just regularize the process, and always override the HID
descriptor.

Always overriding the descriptor changes the current semantic a little
bit, before this change the BT descriptor still had the trailing zero
byte, while now it is exactly the same as the descriptor of the
controller via USB, but that does not affect proper operation of the
device.

Note that overriding the whole descriptor for original devices is not
strictly necessary for now, but it simplifies the code and in the future
the report descriptor will be patched further and keys will be remapped,
so it's handy to have only one place to patch.

Signed-off-by: default avatarAntonio Ospite <ao2@ao2.it>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 50764650
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment