mode_dinput.h 894 B

123456789101112131415161718192021222324
  1. // mode_dinput.h -- generic DirectInput joystick personality (MODE_DINPUT).
  2. //
  3. // Flight/space sims bind axes through DirectInput, which is limited to 8 axes per device (DIJOYSTATE2), while
  4. // the SC2 offers 13 analog inputs. This mode therefore presents each controller as TWO joysticks (two top-level
  5. // HID collections on one interface -- Windows creates one HIDClass PDO, and thus one DirectInput device, per
  6. // top-level collection) so every axis is bindable at the same time. See mode_dinput.cpp for the axis map.
  7. #pragma once
  8. #include "controllers.h"
  9. class DInputController : public IController {
  10. public:
  11. void begin() override;
  12. void task() override;
  13. bool dynamicMount() const override
  14. {
  15. return true;
  16. }
  17. uint8_t maxSlots() const override;
  18. void usbIdentity() override;
  19. void beginPool() override;
  20. void mountSlots(uint8_t k) override;
  21. };
  22. extern DInputController g_dinputCtl;