Subversion Repositories svn.mios32

Rev

Rev 2494 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2494 Rev 2518
Line 82... Line 82...
82
        callback_f(curpath);
82
        callback_f(curpath);
83
    }
83
    }
84
}
84
}
85
static inline void GotDir(){
85
static inline void GotDir(){
86
    sprintf((char*)(curpath[1] == 0 ? curpath : curpath + strlen(curpath)), "/%s", cursubdir);
86
    sprintf((char*)(curpath[1] == 0 ? curpath : curpath + strlen(curpath)), "/%s", cursubdir);
-
 
87
    MUTEX_SDCARD_TAKE;
87
    if(!FILE_DirExists(curpath)){
88
    if(!FILE_DirExists(curpath)){
88
        if(FILE_MakeDir(curpath) < 0) waserror = 1;
89
        if(FILE_MakeDir(curpath) < 0) waserror = 1;
89
    }
90
    }
90
    cursubdir[0] = 0;
91
    cursubdir[0] = 0;
91
    s32 ret = FILE_FindNextFile(curpath, NULL, extn, curname);
92
    s32 ret = FILE_FindNextFile(curpath, NULL, extn, curname);
92
    if(ret < 0) waserror = 1;
93
    if(ret < 0) waserror = 1;
93
    ret = FILE_FindNextDir(curpath, NULL, cursubdir);
94
    ret = FILE_FindNextDir(curpath, NULL, cursubdir);
-
 
95
    MUTEX_SDCARD_GIVE;
94
    if(ret < 0) waserror = 1;
96
    if(ret < 0) waserror = 1;
95
    cursor = (cursubdir[0] == 0); //If there's no subdirectories, point cursor to files
97
    cursor = (cursubdir[0] == 0); //If there's no subdirectories, point cursor to files
96
    DrawMenu();
98
    DrawMenu();
97
}
99
}
98
100
Line 228... Line 230...
228
            curpath[i] = 0;
230
            curpath[i] = 0;
229
            ++j;
231
            ++j;
230
            ++i;
232
            ++i;
231
        }
233
        }
232
        cursubdir[j] = 0;
234
        cursubdir[j] = 0;
-
 
235
        MUTEX_SDCARD_TAKE;
233
        s32 ret = FILE_FindNextFile(curpath, NULL, extn, curname);
236
        s32 ret = FILE_FindNextFile(curpath, NULL, extn, curname);
-
 
237
        MUTEX_SDCARD_GIVE;
234
        if(ret < 0) waserror = 1;
238
        if(ret < 0) waserror = 1;
235
        cursor = 0;
239
        cursor = 0;
236
        DrawMenu();
240
        DrawMenu();
237
    }else if(softkey <= 3){
241
    }else if(softkey <= 3){
238
        cursor = 0;
242
        cursor = 0;