forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[PROBLEM] File browser and kernel mode prx

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
beasymbole



Joined: 29 Nov 2008
Posts: 2

PostPosted: Sat Nov 29, 2008 5:51 am    Post subject: [PROBLEM] File browser and kernel mode prx Reply with quote

Hello everyone,

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:

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;
     }   
}


It only displays one dir and not all dirs which are present in ms0:

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 :)
Back to top
View user's profile Send private message
beasymbole



Joined: 29 Nov 2008
Posts: 2

PostPosted: Sat Nov 29, 2008 7:57 pm    Post subject: Reply with quote

Any idea??
Back to top
View user's profile Send private message
steffven



Joined: 19 May 2008
Posts: 28

PostPosted: Sat Nov 29, 2008 9:58 pm    Post subject: Reply with quote

Take a look at this:
http://www.psp-programming.com/forums/index.php?topic=1333.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group