Menu

Auto "L" timeout ?

Couin
2016-03-23
2016-03-24
  • Couin

    Couin - 2016-03-23

    Hi,

    Here is another question :)

    I did some mods so browsing the playlist with up/dn arrows switch to LCD item1 .
    If I not choose a track, LCD returns to default item (LCDpagereset, default item is playing track for me), but the playlist stays to the last position.

    As well as l (tiny L) recall the playlist to select actual playing track, I would create something that a timeout (fixed in the code, or related to LCDpagereset value), like if it automaticaly hits L key.

    I try a lot of codes but between errors at compiling, or no requiered result, I have no really idea of what I could do :(

    I would appreciate any idea and/or piece of code to get it.

    Thanks :)

     
  • Couin

    Couin - 2016-03-24

    Yop !

    got it by adding a part of keyboard.c code into lcd.c file :)

    At the beginning :

    #include <process.h>
    #include <mpxplay.h>
    #include "control\cntfuncs.h"
    #include "au_mixer\au_mixer.h"
    #include "display\display.h"
    #include "mpxinbuf.h"
    #include "mpxplay.h"
    #include "control\control.h"
    
    void rappel(struct mainvars *mvp){
     char sout[300];
     struct playlist_side_info *psip=mvp->psip;
        if((mvp->aktfilenum<psip->firstsong) && (psip->editsidetype&PLT_DIRECTORY) && !psip->sublistlevel && mvp->pei0->filename){
         pds_getpath_from_fullname(sout,mvp->pei0->filename);
         playlist_loaddir_browser_gotodir(psip,sout);
        }
        playlist_editlist_tab_select(mvp,psip->sidenum,psip->tabnum);
        playlist_editorhighline_set(psip,mvp->aktfilenum);
    }
    

    And add rappel(mvp); before LCD_currpage=0; :

     if(lcd_control&LCT_PAGERESET){
      if(++lcd_delaycount_pagereset>LCD_pagereset_delay){
          // Couin pour que la playlist revienne à la zic en cours
      rappel(mvp);
       LCD_currpage=0;
       lcd_delaycount_pagereset=0;
       funcbit_disable(lcd_control,LCT_PAGERESET);
       LCD_linescroll_stop();
       refresh=1;
      }
     }
    

    Works great as wanted :)

    Cheers !

     

    Last edit: Couin 2016-03-24

Log in to post a comment.