forked from len0rd/rockbox
rgnano: Sleep timer and idle poweroff support
Actually power off the handheld with the sleep timer and idle poweroff functions instead of closing rockbox. This commit also moves setting system volume to max from the launch script to system-sdl.c so it works when running rockbox via instant play. Change-Id: I174b67c6abef451faa05f4a8f52b8d9eeed98a22
This commit is contained in:
parent
5ecb5832e1
commit
c9e16e4888
6 changed files with 38 additions and 28 deletions
|
@ -586,16 +586,18 @@ static void button_event(int key, bool pressed)
|
|||
return;
|
||||
#endif
|
||||
#endif
|
||||
#if (CONFIG_PLATFORM & PLATFORM_PANDORA) || defined(RG_NANO)
|
||||
#ifdef RG_NANO
|
||||
case SDLK_q:
|
||||
#else
|
||||
#if (CONFIG_PLATFORM & PLATFORM_PANDORA)
|
||||
case SDLK_LCTRL:
|
||||
#endif
|
||||
/* Will post SDL_USEREVENT in shutdown_hw() if successful. */
|
||||
sys_poweroff();
|
||||
break;
|
||||
#endif
|
||||
#ifdef RG_NANO
|
||||
case SDLK_q:
|
||||
/* Use reboot to exit without shutting down */
|
||||
sys_reboot();
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAS_BUTTON_HOLD
|
||||
case SDLK_h:
|
||||
if(pressed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue