Make HID logs uniform

This commit is contained in:
Romain Vimont 2024-09-06 23:08:08 +02:00
parent 2595bcfa75
commit 2351eed46f
4 changed files with 12 additions and 12 deletions

View File

@ -21,7 +21,7 @@ sc_keyboard_uhid_send_input(struct sc_keyboard_uhid *kb,
msg.uhid_input.size = hid_input->size; msg.uhid_input.size = hid_input->size;
if (!sc_controller_push_msg(kb->controller, &msg)) { if (!sc_controller_push_msg(kb->controller, &msg)) {
LOGE("Could not send UHID_INPUT message (key)"); LOGE("Could not push UHID_INPUT message (key)");
} }
} }

View File

@ -20,7 +20,7 @@ sc_mouse_uhid_send_input(struct sc_mouse_uhid *mouse,
msg.uhid_input.size = hid_input->size; msg.uhid_input.size = hid_input->size;
if (!sc_controller_push_msg(mouse->controller, &msg)) { if (!sc_controller_push_msg(mouse->controller, &msg)) {
LOGE("Could not send UHID_INPUT message (%s)", name); LOGE("Could not push UHID_INPUT message (%s)", name);
} }
} }
@ -84,7 +84,7 @@ sc_mouse_uhid_init(struct sc_mouse_uhid *mouse,
msg.uhid_create.report_desc = hid_open.report_desc; msg.uhid_create.report_desc = hid_open.report_desc;
msg.uhid_create.report_desc_size = hid_open.report_desc_size; msg.uhid_create.report_desc_size = hid_open.report_desc_size;
if (!sc_controller_push_msg(controller, &msg)) { if (!sc_controller_push_msg(controller, &msg)) {
LOGE("Could not send UHID_CREATE message (mouse)"); LOGE("Could not push UHID_CREATE message (mouse)");
return false; return false;
} }

View File

@ -17,7 +17,7 @@ push_mod_lock_state(struct sc_keyboard_aoa *kb, uint16_t mods_state) {
} }
if (!sc_aoa_push_input(kb->aoa, &hid_input)) { if (!sc_aoa_push_input(kb->aoa, &hid_input)) {
LOGW("Could not push HID input (mod lock state)"); LOGW("Could not push AOA HID input (mod lock state)");
return false; return false;
} }
@ -57,7 +57,7 @@ sc_key_processor_process_key(struct sc_key_processor *kp,
if (!sc_aoa_push_input_with_ack_to_wait(kb->aoa, &hid_input, if (!sc_aoa_push_input_with_ack_to_wait(kb->aoa, &hid_input,
ack_to_wait)) { ack_to_wait)) {
LOGW("Could not push HID input (key)"); LOGW("Could not push AOA HID input (key)");
} }
} }
} }
@ -71,7 +71,7 @@ sc_keyboard_aoa_init(struct sc_keyboard_aoa *kb, struct sc_aoa *aoa) {
bool ok = sc_aoa_push_open(aoa, &hid_open); bool ok = sc_aoa_push_open(aoa, &hid_open);
if (!ok) { if (!ok) {
LOGW("Could not push AOA keyboard open request"); LOGW("Could not push AOA HID open (keyboard)");
return false; return false;
} }
@ -103,6 +103,6 @@ sc_keyboard_aoa_destroy(struct sc_keyboard_aoa *kb) {
bool ok = sc_aoa_push_close(kb->aoa, &hid_close); bool ok = sc_aoa_push_close(kb->aoa, &hid_close);
if (!ok) { if (!ok) {
LOGW("Could not push AOA keyboard close request"); LOGW("Could not push AOA HID close (keyboard)");
} }
} }

View File

@ -18,7 +18,7 @@ sc_mouse_processor_process_mouse_motion(struct sc_mouse_processor *mp,
sc_hid_mouse_generate_input_from_motion(&hid_input, event); sc_hid_mouse_generate_input_from_motion(&hid_input, event);
if (!sc_aoa_push_input(mouse->aoa, &hid_input)) { if (!sc_aoa_push_input(mouse->aoa, &hid_input)) {
LOGW("Could not push HID input (mouse motion)"); LOGW("Could not push AOA HID input (mouse motion)");
} }
} }
@ -31,7 +31,7 @@ sc_mouse_processor_process_mouse_click(struct sc_mouse_processor *mp,
sc_hid_mouse_generate_input_from_click(&hid_input, event); sc_hid_mouse_generate_input_from_click(&hid_input, event);
if (!sc_aoa_push_input(mouse->aoa, &hid_input)) { if (!sc_aoa_push_input(mouse->aoa, &hid_input)) {
LOGW("Could not push HID input (mouse click)"); LOGW("Could not push AOA HID input (mouse click)");
} }
} }
@ -44,7 +44,7 @@ sc_mouse_processor_process_mouse_scroll(struct sc_mouse_processor *mp,
sc_hid_mouse_generate_input_from_scroll(&hid_input, event); sc_hid_mouse_generate_input_from_scroll(&hid_input, event);
if (!sc_aoa_push_input(mouse->aoa, &hid_input)) { if (!sc_aoa_push_input(mouse->aoa, &hid_input)) {
LOGW("Could not push HID input (mouse scroll)"); LOGW("Could not push AOA HID input (mouse scroll)");
} }
} }
@ -57,7 +57,7 @@ sc_mouse_aoa_init(struct sc_mouse_aoa *mouse, struct sc_aoa *aoa) {
bool ok = sc_aoa_push_open(aoa, &hid_open); bool ok = sc_aoa_push_open(aoa, &hid_open);
if (!ok) { if (!ok) {
LOGW("Could not push AOA mouse open request"); LOGW("Could not push AOA HID open (mouse)");
return false; return false;
} }
@ -83,6 +83,6 @@ sc_mouse_aoa_destroy(struct sc_mouse_aoa *mouse) {
bool ok = sc_aoa_push_close(mouse->aoa, &hid_close); bool ok = sc_aoa_push_close(mouse->aoa, &hid_close);
if (!ok) { if (!ok) {
LOGW("Could not push AOA mouse close request"); LOGW("Could not push AOA HID close (mouse)");
} }
} }