I have a problem: indeed, I want to do a file browser in my prx coded in kernel mode but when I use this simple function:
Code: Select all
void filebrowser(SceCtrlData *ut) {
struct SceIoDirent dossier;
memset(&dossier, 0, sizeof(SceIoDirent));
int pr;
pr = sceIoDopen("ms0:");
if(MenuExplor) {
if(pr >= 0) {
while(sceIoDread(pr, &dossier) > 0) {
if(FIO_S_ISDIR(dossier.d_stat.st_mode)) {//if it's a dir
sprintf(listdir, "%s\n", dossier.d_name);
}
}
}
}
if(ut->Buttons & PSP_CTRL_SQUARE) {
MenuExplor = 1;
}
else if(ut->Buttons & PSP_CTRL_TRIANGLE) {
MenuExplor = 0;
}
}
But when I use this function in user mode, it works and displays all dir which are present in ms0:...
Consequently, how I can resolve this problem and why is it working well in user mode and not in kernel mode?
Thanks :)