diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2008-01-09 14:26:19 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2008-01-09 14:26:19 +0000 |
commit | 741f5b24b37b8f3f8e89f3b21bcc071f05dcc701 (patch) | |
tree | 101517d62f10539eb185b7110609be5d5a9a4d6d | |
parent | e953bcb2d47a593a49ce536856dea0d55937cb4e (diff) | |
download | rockbox-741f5b24b37b8f3f8e89f3b21bcc071f05dcc701.tar.gz rockbox-741f5b24b37b8f3f8e89f3b21bcc071f05dcc701.zip |
Prevent idle poweroff in the MPEG player plugin. Also save the settings when receiving SYS_POWEROFF and SYS_USB_CONNECTED. Fixes FS#8439 and FS#8388.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16033 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index b228a88dda..b547d36f6a 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -1231,6 +1231,10 @@ static void button_loop(void) { int button = rb->button_get_w_tmo(WVS_MIN_UPDATE_INTERVAL); + /* Make sure Rockbox doesn't turn off the player because of + too little activity */ + rb->reset_poweroff_timer(); + switch (button) { case BUTTON_NONE: @@ -1337,6 +1341,7 @@ static void button_loop(void) /* Stop and get the resume time before closing the file early */ wvs_stop(); stream_close(); + save_settings(); /* Save settings (if they have changed) */ /* Fall-through */ default: rb->default_event_handler(button); |