1
0
Fork 0
forked from len0rd/rockbox

Pause now works again (I broke it with my mpeg_is_playing() fix...)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1802 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-08-19 12:38:27 +00:00
parent 9315282b1e
commit 43bcd823b7

View file

@ -70,6 +70,7 @@
bool keys_locked = false;
bool device_muted = false;
static bool ff_rewind = false;
static bool paused = false;
static void draw_screen(struct mp3entry* id3)
{
@ -507,11 +508,7 @@ int wps_show(void)
button_set_release(old_release_mask);
return 0;
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_PLAY:
#else
case BUTTON_UP:
#endif
if (keys_locked)
{
display_keylock_text(keys_locked);
@ -519,12 +516,13 @@ int wps_show(void)
break;
}
if ( mpeg_is_playing() )
if ( !paused )
{
mpeg_pause();
paused = true;
status_set_playmode(STATUS_PAUSE);
status_draw();
if (global_settings.resume) {
status_draw();
settings_save();
#ifndef HAVE_RTC
ata_flush();
@ -534,7 +532,9 @@ int wps_show(void)
else
{
mpeg_resume();
paused = false;
status_set_playmode(STATUS_PLAY);
status_draw();
}
break;