You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
588B

  1. #pragma once
  2. #include "util/common.hpp"
  3. #include "midi.hpp"
  4. namespace rack {
  5. const int GAMEPAD_DRIVER = -10;
  6. struct GamepadInputDevice : MidiInputDevice {
  7. int deviceId;
  8. std::vector<uint8_t> ccs;
  9. std::vector<bool> states;
  10. void step();
  11. };
  12. struct GamepadInputDriver : MidiInputDriver {
  13. GamepadInputDevice devices[16];
  14. GamepadInputDriver();
  15. std::vector<int> getDeviceIds() override;
  16. std::string getDeviceName(int deviceId) override;
  17. MidiInputDevice *getDevice(int deviceId) override;
  18. };
  19. void gamepadStep();
  20. MidiInputDriver *gamepadGetInputDriver();
  21. } // namespace rack