I moved the callbacks to an external kernel mode prx, and it worked through both psplink and the xmb. But I'm figuring I shouldn't have to do this, there must be something I'm missing and its driving me insane.
code for sanity check.
Code: Select all
#include <pspctrl.h>
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspmoduleinfo.h>
#include <pspthreadman.h>
#include <pspfpu.h>
#include <psppower.h>
PSP_MODULE_INFO("Test", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_MAX();
// Exit callback
int ExitCallback(int arg1, int arg2, void *common) {
	sceKernelExitGame();
	return 0;
}
// Callback thread
int CallbackThread(SceSize args, void *argp) {
	int cbid;
	cbid = sceKernelCreateCallback("Exit Callback", ExitCallback, NULL);
	sceKernelRegisterExitCallback(cbid);
	sceKernelSleepThreadCB();
	
	return 0;
}
// Sets up the callback thread and returns its thread id
int SetupCallbacks(void) {
	int thid = 0;
	
	thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
	if(thid >= 0) {
		sceKernelStartThread(thid, 0, 0);
	}
	
	return thid;
}
int main(int argc, char** args)
{
	SetupCallbacks();
	// etc
}