kopia lustrzana https://gitlab.com/eliggett/wfview
More gamepad stuff
rodzic
2dad92b9f6
commit
ba07c26a2b
|
@ -4,5 +4,6 @@
|
|||
<file>shuttlexpress.png</file>
|
||||
<file>shuttlepro.png</file>
|
||||
<file>rc28.png</file>
|
||||
<file>xbox.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -81,7 +81,7 @@ void usbController::run()
|
|||
if (gamepad == Q_NULLPTR) {
|
||||
auto gamepads = QGamepadManager::instance()->connectedGamepads();
|
||||
if (!gamepads.isEmpty()) {
|
||||
qInfo(logUsbControl()) << "Found" << gamepads << "Gamepad controllers";
|
||||
qInfo(logUsbControl()) << "Found" << gamepads.size() << "Gamepad controllers";
|
||||
// If we got here, we have detected a gamepad of some description!
|
||||
gamepad = new QGamepad(*gamepads.begin(), this);
|
||||
qInfo(logUsbControl()) << "Gamepad 0 is " << gamepad->name();
|
||||
|
|
|
@ -100,7 +100,7 @@ signals:
|
|||
|
||||
private:
|
||||
hid_device* handle;
|
||||
enum { NONE, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad }usbDevice;
|
||||
enum { NONE=0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad }usbDevice;
|
||||
bool isOpen=false;
|
||||
unsigned int buttons=0;
|
||||
unsigned char jogpos=0;
|
||||
|
|
Ładowanie…
Reference in New Issue