18.12.2014, 17:49
Hallöchen,
ich habe ein wenig mit hallo welt code rumgespielt, und dabei folgendes zusammengeschustert
ich habe ein wenig mit hallo welt code rumgespielt, und dabei folgendes zusammengeschustert
Code:
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <stdlib.h>
#include <string.h>
PSP_MODULE_INFO("helloworld", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
#define printf pspDebugScreenPrintf
void dump_threadstatus(void);
int done = 0;
int exit_callback(int arg1, int arg2, void *common)
{
done = 1;
return 0;
}
int CallbackThread(SceSize args, void *argp)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
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(void)
{
SceCtrlData pad;
pspDebugScreenInit();
pspDebugScreenClear();
SetupCallbacks();
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
while(!done){
pspDebugScreenSetXY(0, 0);
sceCtrlReadBufferPositive(&pad, 1);
printf("Hello World by m1mk \n");
printf("http://psp.m1mk.de\n");
printf(" \n");
printf("Press () to exit ! .. \n");
if (pad.Buttons & PSP_CTRL_CIRCLE){
pspDebugScreenClear();
printf("Bye Bye ... \n");
sceKernelExitGame();
}
}
sceKernelExitGame();;
return 0;
}
Das Problem ist, der text in der zweiten zeile also printf("http://psp.m1mk.de\n");
flackert ein wenig..
habe nur notepad ++ gebutzt weiss also nicht ob es warnings gibt