mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-11 12:56:41 +00:00
nyx: Allow screenshots only every 2s
This commit is contained in:
parent
f5432c734c
commit
2f7be43ccb
1 changed files with 11 additions and 2 deletions
|
@ -204,9 +204,18 @@ static bool _fts_touch_read(lv_indev_data_t *data)
|
||||||
|
|
||||||
// Take a screenshot if 3 fingers.
|
// Take a screenshot if 3 fingers.
|
||||||
if (touchpad.fingers > 2)
|
if (touchpad.fingers > 2)
|
||||||
|
{
|
||||||
|
// Disallow screenshots if less than 2s passed.
|
||||||
|
static u32 timer = 0;
|
||||||
|
if (get_tmr_ms() > timer)
|
||||||
{
|
{
|
||||||
_save_fb_to_bmp();
|
_save_fb_to_bmp();
|
||||||
msleep(200);
|
timer = get_tmr_ms() + 2000;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->state = LV_INDEV_STATE_REL;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (console_enabled)
|
if (console_enabled)
|
||||||
|
|
Loading…
Reference in a new issue