mirror of
https://github.com/joel16/gLib2D.git
synced 2024-11-23 09:59:58 +00:00
parent
3aaab4c50e
commit
c347d4d227
26
sample/Makefile
Normal file
26
sample/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
all:
|
||||
make -C clock
|
||||
make -C coordinates
|
||||
make -C deform
|
||||
make -C depth
|
||||
make -C objcontrol
|
||||
make -C screensaver
|
||||
make -C transform
|
||||
|
||||
clean:
|
||||
make -C clock clean
|
||||
make -C coordinates clean
|
||||
make -C deform clean
|
||||
make -C depth clean
|
||||
make -C objcontrol clean
|
||||
make -C screensaver clean
|
||||
make -C transform clean
|
||||
|
||||
install:
|
||||
make -C clock install
|
||||
make -C coordinates install
|
||||
make -C deform install
|
||||
make -C depth install
|
||||
make -C objcontrol install
|
||||
make -C screensaver install
|
||||
make -C transform install
|
38
sample/callbacks.h
Normal file
38
sample/callbacks.h
Normal file
@ -0,0 +1,38 @@
|
||||
#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__
|
Loading…
Reference in New Issue
Block a user