mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-15 01:07:22 +00:00
some change
- add [beta] for YT Shorts - fix pause click on like button - fix slide screen
This commit is contained in:
parent
57d9cdb3c4
commit
1c65ec9ef2
2 changed files with 5 additions and 12 deletions
2
applications/external/hid_app/hid.c
vendored
2
applications/external/hid_app/hid.c
vendored
|
@ -120,7 +120,7 @@ Hid* hid_alloc(HidTransport transport) {
|
|||
app);
|
||||
submenu_add_item(
|
||||
app->device_type_submenu,
|
||||
"YT Shorts Controller",
|
||||
"[Beta]YT Shorts Controller",
|
||||
HidSubmenuIndexYTShorts,
|
||||
hid_submenu_callback,
|
||||
app);
|
||||
|
|
15
applications/external/hid_app/views/hid_tiktok.c
vendored
15
applications/external/hid_app/views/hid_tiktok.c
vendored
|
@ -178,32 +178,25 @@ static bool hid_tiktok_input_callback(InputEvent* event, void* context) {
|
|||
} else if(event->type == InputTypeShort) {
|
||||
if(event->key == InputKeyOk) {
|
||||
hid_hal_mouse_press(hid_tiktok->hid, HID_MOUSE_BTN_LEFT);
|
||||
furi_delay_ms(50);
|
||||
furi_delay_ms(25);
|
||||
hid_hal_mouse_release(hid_tiktok->hid, HID_MOUSE_BTN_LEFT);
|
||||
furi_delay_ms(50);
|
||||
furi_delay_ms(100);
|
||||
hid_hal_mouse_press(hid_tiktok->hid, HID_MOUSE_BTN_LEFT);
|
||||
furi_delay_ms(50);
|
||||
furi_delay_ms(25);
|
||||
hid_hal_mouse_release(hid_tiktok->hid, HID_MOUSE_BTN_LEFT);
|
||||
consumed = true;
|
||||
} else if(event->key == InputKeyDown) {
|
||||
// Swipe to new video
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, 6);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, 12);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, 19);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, 12);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, 6);
|
||||
consumed = true;
|
||||
} else if(event->key == InputKeyUp) {
|
||||
// Swipe to previous video
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, -6);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, -12);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, -19);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, -12);
|
||||
hid_hal_mouse_scroll(hid_tiktok->hid, -6);
|
||||
consumed = true;
|
||||
} else if(event->key == InputKeyBack) {
|
||||
// Pause
|
||||
hid_hal_mouse_press(hid_tiktok->hid, HID_MOUSE_BTN_RIGHT);
|
||||
furi_delay_ms(25);
|
||||
hid_hal_mouse_release(hid_tiktok->hid, HID_MOUSE_BTN_RIGHT);
|
||||
consumed = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue