PS3 Homebrew exit to XMB

JMGK

Developer
Hi,

If i use PS button+quit to XMB, my homebrew cause a system reboot.

But if i exit throught return 0 in main(), everything work fine. I though it may be related to mem allocation and others cleanups, so set a atexit() to do it, but the reboot continue.

Anybody know anything about this?
 
Hi,

If i use PS button+quit to XMB, my homebrew cause a system reboot.

But if i exit throught return 0 in main(), everything work fine. I though it may be related to mem allocation and others cleanups, so set a atexit() to do it, but the reboot continue.

Anybody know anything about this?

I'm pretty sure you need to add the XMB callbacks to your homebrew app to handle the "exit from XMB" properly.
You can take a look at my Apollo (or Artemis) source code for an implementation:
https://github.com/bucanero/apollo-...b2b896ea6a2466ce724268233c/source/main.c#L231

you need at least to handle the SYSUTIL_EXIT_GAME callback status so the homebrew can exit properly.

ps: now that you mention it, I think that I missed adding this callback to PKGi ... so weird that nobody reported such error! I'll add it to the next release.
 
Thanks! It worked perfect! I used a lambda and reduced it to one line:
Code:
sysUtilRegisterCallback(SYSUTIL_EVENT_SLOT0,[](uint64_t status,uint64_t param,void *userdata){if(status==SYSUTIL_EXIT_GAME){cleanup();sysProcessExit(1);}},NULL);
 

Similar threads

Back
Top