More gamepad stuff

half-duplex
Phil Taylor 2022-10-22 23:36:19 +01:00
rodzic 2dad92b9f6
commit ba07c26a2b
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -4,5 +4,6 @@
<file>shuttlexpress.png</file>
<file>shuttlepro.png</file>
<file>rc28.png</file>
<file>xbox.png</file>
</qresource>
</RCC>

Wyświetl plik

@ -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();

Wyświetl plik

@ -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;