mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-02-22 14:24:43 +01:00
Add UHID_DESTROY control message
This message will be sent on gamepad disconnection. Contrary to keyboard and mouse, which are registered once and are unregistered when scrcpy exists, each gamepad is mapped with its own HID id, and they can be plugged/unplugged dynamically.
This commit is contained in:
@@ -39,6 +39,7 @@ enum sc_control_msg_type {
|
||||
SC_CONTROL_MSG_TYPE_ROTATE_DEVICE,
|
||||
SC_CONTROL_MSG_TYPE_UHID_CREATE,
|
||||
SC_CONTROL_MSG_TYPE_UHID_INPUT,
|
||||
SC_CONTROL_MSG_TYPE_UHID_DESTROY,
|
||||
SC_CONTROL_MSG_TYPE_OPEN_HARD_KEYBOARD_SETTINGS,
|
||||
};
|
||||
|
||||
@@ -105,6 +106,9 @@ struct sc_control_msg {
|
||||
uint16_t size;
|
||||
uint8_t data[SC_HID_MAX_SIZE];
|
||||
} uhid_input;
|
||||
struct {
|
||||
uint16_t id;
|
||||
} uhid_destroy;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user