mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-02-22 06:14:31 +01:00
This allows to handle HID open/close at the same place as HID input events (in the HID layer). This will be especially useful to manage HID gamepads, to avoid implementing one part in the HID layer and another part in the gamepad processor implementation.
27 lines
405 B
C
27 lines
405 B
C
#ifndef SC_HID_EVENT_H
|
|
#define SC_HID_EVENT_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
#define SC_HID_MAX_SIZE 8
|
|
|
|
struct sc_hid_input {
|
|
uint16_t hid_id;
|
|
uint8_t data[SC_HID_MAX_SIZE];
|
|
uint8_t size;
|
|
};
|
|
|
|
struct sc_hid_open {
|
|
uint16_t hid_id;
|
|
const uint8_t *report_desc; // pointer to static memory
|
|
size_t report_desc_size;
|
|
};
|
|
|
|
struct sc_hid_close {
|
|
uint16_t hid_id;
|
|
};
|
|
|
|
#endif
|