]> git.webhop.me Git - shellexec.git/commitdiff
- shellexec: re-enable MENUTIMEOUT setting; ...
authorsvenhoefer <svenhoefer@svenhoefer.com>
Tue, 20 Sep 2016 16:49:28 +0000 (18:49 +0200)
committersvenhoefer <svenhoefer@svenhoefer.com>
Tue, 20 Sep 2016 16:49:28 +0000 (18:49 +0200)
read default timeout from neutrino.conf; MENUTIMEOUT setting
overrides this.

shellexec.c

index 261903d6428fda0486d42ea9fcc8b4b277718801..863067724a2cedd506905b15400001d34a2a8f29 100644 (file)
@@ -469,12 +469,10 @@ int Check_Config(void)
                                        {
                                                sscanf(strchr(line_buffer,'=')+1,"%d",&FSIZE_MED);
                                        }
-#if 0
                                        if(strstr(line_buffer,"MENUTIMEOUT=")==line_buffer)
                                        {
                                                sscanf(strchr(line_buffer,'=')+1,"%d",&mtmo);
                                        }
-#endif
                                        if(strstr(line_buffer,"PAGING=")==line_buffer)
                                        {
                                                sscanf(strchr(line_buffer,'=')+1,"%d",&paging);
@@ -854,12 +852,8 @@ int Get_Selection(MENU *m)
 
                        case -1:
                                knew=0;
-#if 0
-                               if(mtmo == 0)
-                                       break;
-#endif
                                time(&tm2);
-                               if((tm2-tm1)<mtmo)
+                               if(mtmo==0 || (tm2-tm1)<mtmo)
                                {
                                        break;
                                }
@@ -1607,6 +1601,10 @@ int main (int argc, char **argv)
        else
                radius=0;
 
+       mtmo = Read_Neutrino_Cfg("timing.menu");
+       if (mtmo < 0)
+               mtmo = 0;
+
        cindex=CMC;
        for(index=COL_MENUCONTENT_PLUS_0; index<=COL_MENUCONTENT_PLUS_3; index++)
        {