Initialize UHID devices with a custom name: - "scrcpy: $GAMEPAD_NAME" for gamepads - "scrcpy" for keyboard and mouse (or if no gamepad name is available) The name may appear in Android apps. PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
28 lines
456 B
C
28 lines
456 B
C
#ifndef SC_HID_EVENT_H
|
|
#define SC_HID_EVENT_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
#define SC_HID_MAX_SIZE 15
|
|
|
|
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 char *name; // pointer to static memory
|
|
const uint8_t *report_desc; // pointer to static memory
|
|
size_t report_desc_size;
|
|
};
|
|
|
|
struct sc_hid_close {
|
|
uint16_t hid_id;
|
|
};
|
|
|
|
#endif
|