Commit Graph

10 Commits

Author SHA1 Message Date
Marc Mutz 5a149c75d7 Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-free and warning_clean
Change-Id: I67813e8d2d27d39d772099b2d9d77bbe9bfa476e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-09-22 11:10:38 +00:00
Marc Mutz bb53183d40 QEvdevGamepadDevice: use std::abs() instead of fabs()
Both includes were missing, so GCC complained that fabs() was not
declared.

Fix by including <cmath> and using std::abs() instead.

Change-Id: Ifc717bd68d3572e114937712c867c3d004c1fa2e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-03-08 08:42:35 +00:00
BogDan Vatra dcf69f67ed EVDEV: Button[L2|R2] Act as an axis
Change-Id: I33e90ece7a7563b9136cd40c8c730fcfc6bfa340
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-02-01 08:15:02 +00:00
BogDan Vatra fc439bd7d3 EVDEV: Don't send negative values
Change-Id: I7e8925d7488347217f83dd7de340912bb8bb113a
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-02-01 08:12:09 +00:00
BogDan Vatra 4cec239adb EVDEV: Use a reliable deviceId
Change-Id: I12182a4501e6a6a0fc8608891590db473db8138a
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-02-01 08:05:34 +00:00
BogDan Vatra c32e995bc7 Enable the usage of unknown gamepads.
Allowing the user to configure every button & axis of (s)his gamepad,
will enable the usage of any gamepad.
Currently only evdev backed has this feature.

Change-Id: I6e0692980e77b448d20d5ba818b787a7b89e7257
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-10-26 12:40:37 +00:00
BogDan Vatra 61705b375d EVDEV: Fix normalize logic.
Also add and use flat info.

Change-Id: Ie3229c01eba6ef71e49d3db8fdd6dc68137b1b0f
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-10-15 08:49:56 +00:00
BogDan Vatra 5b96c19f6e Rename index -> deviceId
index is not the smartest way to uniquely identify a device, let's use something that doesn't change.


Change-Id: Idf925b13efc8dd604f185ea8de44659509d11054
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-10-15 08:49:40 +00:00
BogDan Vatra fe6040df4b EVDEV: Add QGamepadManager::Button[L/R]2 buttons.
Change-Id: Ia240c05a55fe19a0d8670f950ca86bc2c5492d81
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-10-15 08:44:08 +00:00
Andy Nichols 298e4e678b Initial public release of Qt Gamepad module
Qt Gamepad is a Qt 5 module that adds support for using Gamepad devices
(like the XBox 360 controller) inside of Qt applications.

Change-Id: I5dff629dcfdcc5625a90274017b8e97f45e8fd30
2015-05-11 16:48:38 +02:00