Guest User

Untitled

a guest
Apr 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. /* Llamada de salida */
  2. int exit_callback(int arg1, int arg2, void *common) {
  3.           sceKernelExitGame();
  4.           return 0;
  5. }
  6.  
  7. /* Llamada thread */
  8. int CallbackThread(SceSize args, void *argp) {
  9.           int cbid;
  10.  
  11.           cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
  12.           sceKernelRegisterExitCallback(cbid);
  13.  
  14.           sceKernelSleepThreadCB();
  15.  
  16.           return 0;
  17. }
  18.  
  19. /* Configura llamada thread y vuelve a su thread id */
  20. int SetupCallbacks(void) {
  21.           int thid = 0;
  22.  
  23.           thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
  24.           if(thid >= 0) {
  25.                     sceKernelStartThread(thid, 0, 0);
  26.           }
  27.  
  28.           return thid;
  29. }
Add Comment
Please, Sign In to add comment