mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 14:20:21 +00:00
bluetooth-mitm: add function to signal a fake hid event
This commit is contained in:
parent
bb9ab12889
commit
2254589865
2 changed files with 9 additions and 0 deletions
|
@ -84,6 +84,13 @@ namespace ams::bluetooth::hid {
|
|||
return ams::ResultSuccess();
|
||||
}
|
||||
|
||||
void SignalFakeEvent(HidEventType type, const void *data, size_t size) {
|
||||
g_current_event_type = type;
|
||||
std::memcpy(g_event_info_buffer, data, size);
|
||||
|
||||
os::SignalSystemEvent(&g_system_event_fwd);
|
||||
}
|
||||
|
||||
void handleConnectionStateEvent(bluetooth::HidEventInfo *event_info) {
|
||||
switch (event_info->connection_state.state) {
|
||||
case BtdrvHidConnectionState_Connected:
|
||||
|
|
|
@ -32,4 +32,6 @@ namespace ams::bluetooth::hid {
|
|||
Result GetEventInfo(ncm::ProgramId program_id, HidEventType *type, uint8_t* buffer, size_t size);
|
||||
void HandleEvent(void);
|
||||
|
||||
void SignalFakeEvent(HidEventType type, const void *data, size_t size);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue