From 889682d49b30c7e3f9611aa164ce199a79953ec2 Mon Sep 17 00:00:00 2001 From: hans boot Date: Sat, 27 Jan 2024 15:05:34 +0100 Subject: [PATCH 1/2] re-enable idle scripts --- src/hasp/hasp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 9187f4ada..34ba04f84 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -121,18 +121,21 @@ HASP_ATTRIBUTE_FAST_MEM void hasp_update_sleep_state() gui_hide_pointer(true); hasp_sleep_state = HASP_SLEEP_LONG; dispatch_idle_state(HASP_SLEEP_LONG); + dispatch_run_script(NULL, "L:/idle_long.cmd", TAG_MAIN); } } else if(sleepTimeShort > 0 && idle >= sleepTimeShort) { if(hasp_sleep_state != HASP_SLEEP_SHORT) { gui_hide_pointer(true); hasp_sleep_state = HASP_SLEEP_SHORT; dispatch_idle_state(HASP_SLEEP_SHORT); + dispatch_run_script(NULL, "L:/idle_short.cmd", TAG_MAIN); } } else { if(hasp_sleep_state != HASP_SLEEP_OFF) { gui_hide_pointer(false); hasp_sleep_state = HASP_SLEEP_OFF; dispatch_idle_state(HASP_SLEEP_OFF); + dispatch_run_script(NULL, "L:/idle_off.cmd", TAG_MAIN); } } } From c190cf94b54e551eb3adc38d70ceb7fd63de007e Mon Sep 17 00:00:00 2001 From: hans boot Date: Sat, 27 Jan 2024 15:51:33 +0100 Subject: [PATCH 2/2] update to TAG_HASP, as requested --- src/hasp/hasp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 34ba04f84..1a3336eec 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -121,21 +121,21 @@ HASP_ATTRIBUTE_FAST_MEM void hasp_update_sleep_state() gui_hide_pointer(true); hasp_sleep_state = HASP_SLEEP_LONG; dispatch_idle_state(HASP_SLEEP_LONG); - dispatch_run_script(NULL, "L:/idle_long.cmd", TAG_MAIN); + dispatch_run_script(NULL, "L:/idle_long.cmd", TAG_HASP); } } else if(sleepTimeShort > 0 && idle >= sleepTimeShort) { if(hasp_sleep_state != HASP_SLEEP_SHORT) { gui_hide_pointer(true); hasp_sleep_state = HASP_SLEEP_SHORT; dispatch_idle_state(HASP_SLEEP_SHORT); - dispatch_run_script(NULL, "L:/idle_short.cmd", TAG_MAIN); + dispatch_run_script(NULL, "L:/idle_short.cmd", TAG_HASP); } } else { if(hasp_sleep_state != HASP_SLEEP_OFF) { gui_hide_pointer(false); hasp_sleep_state = HASP_SLEEP_OFF; dispatch_idle_state(HASP_SLEEP_OFF); - dispatch_run_script(NULL, "L:/idle_off.cmd", TAG_MAIN); + dispatch_run_script(NULL, "L:/idle_off.cmd", TAG_HASP); } } }