Guest User

Untitled

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