I've compiled my own HelloPSP, but I want to add the posibility to come back to the PSP Menu.
I've have testing many hours but I haven't get anything. I've updated the startup.s and I add in hellopsp.c the following code:
Code: Select all
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* Exit callback */
int exit_callback(void)
{
	sceKernelExitGame();
	return 0;
}
/* Callback thread */
void CallbackThread(void *arg)
{
	int cbid;
	cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);
	sceKernelSleepThreadCB();
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void)
{
	int thid = 0;
	thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, THREAD_ATTR_USER, 0);
	if(thid >= 0)
	{
		sceKernelStartThread(thid, 0, 0);
	}
	return thid;
}
int xmain(int ra)
{
	SetupCallbacks();
	sceKernelSleepThread();
	return 0;
}
The startup.s is this one -> startup.s
I don't know if I have to change anything in the Makefile, or what I have to do.
Can anybody help me please?
Thanks!
Byezzz :).