summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-10-17 14:49:00 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-10-17 14:49:00 +0000
commitb1c429e6fb9a2f6881af2c2dd48cfb17c4477fc4 (patch)
tree122eea193a5dc8689ecf989b34f09e8d28271215 /apps/wps.c
parent3953211531b382ad23b82f35223c0ca82ed9814f (diff)
downloadrockbox-b1c429e6fb9a2f6881af2c2dd48cfb17c4477fc4.tar.gz
rockbox-b1c429e6fb9a2f6881af2c2dd48cfb17c4477fc4.zip
Car Ignition Auto Stop (patch #736339 by Craig Sather)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3976 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/wps.c b/apps/wps.c
index f34ec81d9c..c76d7ade26 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -653,14 +653,22 @@ int wps_show(void)
653 restore = true; 653 restore = true;
654 } 654 }
655 655
656 if (mpeg_status() & MPEG_STATUS_PAUSE) {
657 paused = true;
658 } else {
659 paused = false;
660 }
661
662 while ( 1 ) 656 while ( 1 )
663 { 657 {
658 /* did someone else (i.e power thread) change mpeg pause mode? */
659 if (paused != (mpeg_status() & MPEG_STATUS_PAUSE)) {
660 paused = mpeg_status() & MPEG_STATUS_PAUSE;
661 status_set_playmode(paused ? STATUS_PAUSE : STATUS_PLAY);
662
663 /* if another thread paused mpeg, we are probably in car mode,
664 about to shut down. lets save the settings. */
665 if (paused && global_settings.resume) {
666 settings_save();
667#ifndef HAVE_RTC
668 ata_flush();
669#endif
670 }
671 }
664 672
665#ifdef HAVE_LCD_BITMAP 673#ifdef HAVE_LCD_BITMAP
666 /* when the peak meter is enabled we want to have a 674 /* when the peak meter is enabled we want to have a