mirror of
https://github.com/joel16/gLib2D.git
synced 2024-11-23 18:09:46 +00:00
c347d4d227
Fixes issue #2
39 lines
588 B
C
39 lines
588 B
C
#ifndef __CALLBACKS_H__
|
|
#define __CALLBACKS_H__
|
|
|
|
#include <pspkernel.h>
|
|
|
|
int callbacks_exit()
|
|
{
|
|
sceKernelExitGame();
|
|
|
|
return 0;
|
|
}
|
|
|
|
int callbacks_thread()
|
|
{
|
|
int id;
|
|
|
|
id = sceKernelCreateCallback("exit_cb", callbacks_exit, NULL);
|
|
sceKernelRegisterExitCallback(id);
|
|
sceKernelSleepThreadCB();
|
|
|
|
return 0;
|
|
}
|
|
|
|
int callbacks_setup()
|
|
{
|
|
int id;
|
|
|
|
id = sceKernelCreateThread("cb", callbacks_thread, 0x11, 0xFA0, 0, NULL);
|
|
|
|
if (id >= 0)
|
|
{
|
|
sceKernelStartThread(id, 0, NULL);
|
|
}
|
|
|
|
return id;
|
|
}
|
|
|
|
#endif // __CALLBACKS_H__
|