sceUtilitySavedataGetStatus

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
pegasus2000
Posts: 160
Joined: Wed Jul 12, 2006 7:09 am

sceUtilitySavedataGetStatus

Post by pegasus2000 »

In this piece of code:

Code: Select all


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]
Bubbletune
Posts: 22
Joined: Sat Jan 03, 2009 6:51 am

Post by Bubbletune »

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.
pegasus2000
Posts: 160
Joined: Wed Jul 12, 2006 7:09 am

Post by pegasus2000 »

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...
Post Reply