Ver código fonte

Ensure USBDevice version is set correctly for new modes

Jari 2 meses atrás
pai
commit
47f5d54bd9
3 arquivos alterados com 5 adições e 0 exclusões
  1. 1 0
      OpenPuck/mode_dinput.cpp
  2. 1 0
      OpenPuck/mode_sinput.cpp
  3. 3 0
      OpenPuck/mode_xbox_og.cpp

+ 1 - 0
OpenPuck/mode_dinput.cpp

@@ -250,6 +250,7 @@ void DInputController::usbIdentity()
 	// Deliberately NOT a cloned identity: nothing about DirectInput keys off VID/PID, and a generic ID keeps
 	// Steam Input / the console whitelists from claiming the device out from under the sim.
 	USBDevice.setID(0x1209, 0x4F50); // pid.codes community VID, "OP"
+	USBDevice.setVersion(0x0200);
 	USBDevice.setDeviceVersion(0x0100);
 	USBDevice.setManufacturerDescriptor("OpenPuck");
 	USBDevice.setProductDescriptor("OpenPuck Joystick");

+ 1 - 0
OpenPuck/mode_sinput.cpp

@@ -339,6 +339,7 @@ void SInputController::usbIdentity()
 	// The generic SInput device ID SDL's SInput driver matches on (2E8A = Raspberry Pi, the VID Hand Held
 	// Legend register their gamepads under; 10C6 = generic SInput/HOJA gamepad).
 	USBDevice.setID(0x2E8A, 0x10C6);
+	USBDevice.setVersion(0x0200);
 	USBDevice.setDeviceVersion(0x0210);
 	USBDevice.setManufacturerDescriptor("OpenPuck");
 	USBDevice.setProductDescriptor("OpenPuck SInput");

+ 3 - 0
OpenPuck/mode_xbox_og.cpp

@@ -795,6 +795,9 @@ void XboxOgController::task()
 void XboxOgController::usbIdentity()
 {
 	USBDevice.setID(0x045E, 0x0289);
+	// A real Controller S is a full-speed USB 1.1 device (bcdUSB 1.10,
+	// bcdDevice 1.21). Set it explicitly.
+	USBDevice.setVersion(0x0110);
 	USBDevice.setDeviceVersion(0x0121);
 	// A real Controller S sends no string descriptors (iManufacturer /
 	// iProduct / iSerial = 0); hosts name it from usb.ids. TinyUSB pins