and after i exit with the home key it does the "please wait" and then shows the black screen with "Simple test" flickering....
any one know whats up
Code: Select all
#include <pspkernel.h>
#include <pspdebug.h>
#include <stdlib.h>
#include <string.h>
#include "pg.h"
#include "bitmap.c"
PSP_MODULE_INFO("AA", 0x1000, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(0);
/* Define printf, just to make typing easier */
#define printf pspDebugScreenPrintf
void delay_loop(int num) {
if (num <= 0) return;
for (; num > 0; num--)
sceDisplayWaitVblankStart();
}
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common)
{
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, 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, THREAD_ATTR_USER, 0);
if(thid >= 0)
{
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main(void)
{
SetupCallbacks();
pgInit();
pgScreenFrame(2,0);
while(1){
pgFillvram(0);
pgPrint(0,1,0xffff,"Simple test");
pgScreenFlipV();
pgWaitVn(160);
}
return 0;
}