1
0
Fork 0
forked from len0rd/rockbox

button: allow disabling software poweroff

On some devices, the button driver allows a "software poweroff" by long-
pressing a certain key. This behavior is inconvnient when that button needs
to be held down for other purposes, such as moving the cursor in rockpaint
or sgt-untangle.

This patch allows selectively disabling the software poweroff (enabled by
default) from both core and plugin code.

Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
This commit is contained in:
Franklin Wei 2020-06-26 20:53:15 -04:00
parent f49442d7b7
commit a65a341a00
6 changed files with 55 additions and 3 deletions

View file

@ -387,6 +387,10 @@ static const struct plugin_api rockbox_api = {
#ifdef HAS_BUTTON_HOLD
button_hold,
#endif
#ifdef HAVE_SW_POWEROFF
button_set_sw_poweroff_state,
button_get_sw_poweroff_state,
#endif
#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode,
touchscreen_get_mode,