Understanding homePopup()

While working on an app, I find the following conditions to be consistent of the homePopup():

  • When in a supplied game like Invaderz, pressing HOME brings up the homePopup() and exiting from this returns you directly into the game where you left off.
  • However, when I press HOME in my custom apps, I get the homePopup() called but exiting from this “reboots” into the Main Loader instead of returning to my app.

So, what am I missing here? I have looked at the Invaderz code and I don’t see any special preparations for homePopup() to allow this return to happen properly. I’m at a loss. For now, I’ve employed mp.homePopupEnable(0) to disable homePopup() entirely and am using my own function for that button, but I would love to be able to get into…and out of…homePopup() properly.

EDIT: I also noticed that I have to employ mp.inCall=1 to prevent Ringo from trying to sleep. If allowed to attempt it, the display doesn’t actually sleep…but “waking” it will result in a “reboot” back to Loader (I think I’ve seen this symptom described by someone else before, but struggle to find the thread again). I feel like maybe I’m failing to include some critical parameter, function call, or something else that is resulting is this unusual behavior. I’ve searched in the included game sources for clues (since they manage to all behave properly with these two functions), but haven’t hit on anything that stands out yet.

1 Like

Can anyone chime in here? I’m still at a total loss for why I can’t return from homePopup() properly.

How are you trying to return from the pop up? Pressing the B button goes back to my app.

I figured it out. Turns out homePopup() doesn’t clear mp.buttons.released as it exits and I had a catch for the HOME button because I had homePopup() disabled. Now homePopup() exits without returning to loader. However, when returning from homePopup(), you get dumped to the main menu and the wifi gets disconnected. I probably need better return handling. I plan to add “memory” to the wifi settings; store them to the SD, try to reconnect to that network when initially loading the main menu…save the user time with subsequent launches (and probably squash whatever is causing the wifi to disconnect on return from homePopup()).

Throwing v0.3 up on github in a moment. This will include re-enablement of homePopup() now that it works, and the new live wifi signal strength I added last night in v0.2.2.

Then I’ll get to work on preserving wifi settings for the next revision. I’m still working on the DHCP Settings page behind the scenes, but it’s nowhere near ready yet…mostly because I am still getting a handle on SD card storage, which will be needed for preserving wifi settings between launches anyway. So, I might release DHCP Settings and wifi settings preservation at the same time.


Sorry @TheWebMachine, must’ve missed your post!

Feel free to ask here if anything else is left unclear. Some of the functions are very tricky to understand even for us who wrote them some time ago, so it’s no wonder that you have some questions about them! :sweat_smile:


1 Like