| View previous topic :: View next topic |
| Author |
Message |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Tue May 26, 2009 12:58 am Post subject: sceUtilitySavedataGetStatus |
|
|
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 |
|
 |
Bubbletune
Joined: 03 Jan 2009 Posts: 28
|
Posted: Tue May 26, 2009 1:31 am Post subject: |
|
|
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 |
|
 |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Tue May 26, 2009 1:33 am Post subject: |
|
|
| 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 |
|
 |
|