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 

sceUtilitySavedataGetStatus

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



Joined: 12 Jul 2006
Posts: 160

PostPosted: Tue May 26, 2009 12:58 am    Post subject: sceUtilitySavedataGetStatus Reply with quote

In this piece of code:

Code:


int result = sceUtilitySavedataInitStart(&savedata);
   if (result)
      printf("sceUtilitySavedataInitStart failed: %i\n", result);

   /* Wait for sceUtilitySavedataInitStart() to complete. */
   while (1)               
   {
      result = sceUtilitySavedataGetStatus();
      if (result == 3)
         break;
      sceUtilitySavedataUpdate(1);
      sceDisplayWaitVblankStart();
   }




sceUtilitySavedataGetStatus always returns 0.
Any idea ?

[/code]
Back to top
View user's profile Send private message
Bubbletune



Joined: 03 Jan 2009
Posts: 28

PostPosted: Tue May 26, 2009 1:31 am    Post subject: Reply with quote

You've made a mistake in the error checking for the sceUtilitySavedataInitStart call. Your condition is in fact if (result != 0), and as 0 means succcess and < 0 means error, this will result in it marking it as succesful while it actually errored (and vice versa). Thus, it's obvious that the status never proceeds, because it was never initialized. This is probably because of the structure being invalid, if you post it I could have a look at it. ;)

Last edited by Bubbletune on Tue May 26, 2009 1:43 am; edited 2 times in total
Back to top
View user's profile Send private message
pegasus2000



Joined: 12 Jul 2006
Posts: 160

PostPosted: Tue May 26, 2009 1:33 am    Post subject: Reply with quote

Bubbletune wrote:
Edit: Hold on, misread the question. *rewrites reply*


The trouble is that the answer is ALWAYS 0, so the cycle has no end...
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