1.1 --- a/mp3.c Sat Dec 29 14:52:29 2007 +0100
1.2 +++ b/mp3.c Sat Dec 29 14:53:14 2007 +0100
1.3 @@ -232,7 +232,7 @@
1.4 bool visible, shown, bigwin, statusActive;
1.5 time_t timeoutShow, greentime, oktime;
1.6 int lastkeytime, number;
1.7 - bool selecting, selecthide;
1.8 + bool selecting;
1.9 //
1.10 cMP3PlayInfo *lastMode;
1.11 time_t fliptime, listtime;
1.12 @@ -269,7 +269,7 @@
1.13 cMP3Control::cMP3Control(void)
1.14 :cControl(player=new cMP3Player)
1.15 {
1.16 - visible=shown=bigwin=selecting=selecthide=jumpactive=jumphide=statusActive=false;
1.17 + visible=shown=bigwin=selecting=jumpactive=jumphide=statusActive=false;
1.18 timeoutShow=greentime=oktime=0;
1.19 lastkeytime=number=0;
1.20 lastMode=0;
1.21 @@ -330,13 +330,14 @@
1.22 {
1.23 if(!visible) {
1.24 ShowProgress(true);
1.25 - if(Seconds>0) timeoutShow=time(0)+Seconds;
1.26 + timeoutShow=(Seconds>0) ? time(0)+Seconds : 0;
1.27 }
1.28 }
1.29
1.30 void cMP3Control::Hide(void)
1.31 {
1.32 HideStatus();
1.33 + timeoutShow=0;
1.34 if(visible) {
1.35 #if APIVERSNUM >= 10307
1.36 delete osd; osd=0;
1.37 @@ -765,7 +766,7 @@
1.38 {
1.39 if(!player->Active()) return osEnd;
1.40
1.41 - if(visible && timeoutShow && time(0)>timeoutShow) { Hide(); timeoutShow=0; }
1.42 + if(timeoutShow && time(0)>timeoutShow) Hide();
1.43 ShowProgress();
1.44 #if APIVERSNUM >= 10307
1.45 ShowStatus(Key==kNone && !Skins.IsOpen());
1.46 @@ -856,7 +857,8 @@
1.47 case k0 ... k9:
1.48 number=number*10+Key-k0;
1.49 if(lastMode && number>0 && number<=lastMode->MaxNum) {
1.50 - if(!visible) { ShowTimed(); selecthide=true; }
1.51 + if(!visible) ShowTimed(SELECTHIDE_TIMEOUT);
1.52 + else if(timeoutShow>0) timeoutShow=time(0)+SELECTHIDE_TIMEOUT;
1.53 selecting=true; lastkeytime=time_ms();
1.54 char buf[32];
1.55 #if APIVERSNUM >= 10307
1.56 @@ -879,11 +881,10 @@
1.57 case kNone:
1.58 if(selecting && time_ms()-lastkeytime>SELECT_TIMEOUT) {
1.59 if(number>0) { mgr->Goto(number); player->Play(); }
1.60 - if(selecthide) timeoutShow=time(0)+SELECTHIDE_TIMEOUT;
1.61 if(lastMode) lastMode->Hash=-1;
1.62 - number=0; selecting=selecthide=false;
1.63 -#if APIVERSNUM >= 10307
1.64 - if(MP3Setup.ReplayDisplay) disp->SetJump(0);
1.65 + number=0; selecting=false;
1.66 +#if APIVERSNUM >= 10307
1.67 + if(MP3Setup.ReplayDisplay && disp) disp->SetJump(0);
1.68 #endif
1.69 }
1.70 break;