diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-06-13 16:10:49 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-06-13 16:10:49 +1000 |
| commit | 194f0e6b59259986b36448c376788c227d490f06 (patch) | |
| tree | 6eef1023be1dddd03b1b61612e4d6a64a324fad5 /src/tangara/input/input_hook_actions.cpp | |
| parent | b02d13f5a584c9b0a747b0cefdf92dc867181a50 (diff) | |
| download | tangara-fw-194f0e6b59259986b36448c376788c227d490f06.tar.gz | |
Scroll to 'top/bottom' by only 10 at a time
Prevents a nasty device lockup when scrolling infinite lists
Diffstat (limited to 'src/tangara/input/input_hook_actions.cpp')
| -rw-r--r-- | src/tangara/input/input_hook_actions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tangara/input/input_hook_actions.cpp b/src/tangara/input/input_hook_actions.cpp index bc3760ac..656f8cdb 100644 --- a/src/tangara/input/input_hook_actions.cpp +++ b/src/tangara/input/input_hook_actions.cpp @@ -34,14 +34,14 @@ auto scrollDown() -> HookCallback { auto scrollToTop() -> HookCallback { return HookCallback{.name = "scroll_to_top", .fn = [&](lv_indev_data_t* d) { - d->enc_diff = INT16_MIN; + d->enc_diff = -10; }}; } auto scrollToBottom() -> HookCallback { return HookCallback{ .name = "scroll_to_bottom", - .fn = [&](lv_indev_data_t* d) { d->enc_diff = INT16_MAX; }}; + .fn = [&](lv_indev_data_t* d) { d->enc_diff = 10; }}; } auto goBack() -> HookCallback { |
