The boilerplate code which is generated from monomake generates:
<code>
void AppController::monoWakeFromSleep()
{
// Due to a software bug in the wake-up routines, we need to reset here!
// If not, Mono will go into an infinite loop!
mono::IApplicationContext::SoftwareResetToApplication();
// We never reach this point in the code, CPU has reset!
//
// (Normally) after sleep, the screen memory has been cleared - tell the label to
// draw itself again
helloLabel.scheduleRepaint();
}
</code>
...so, since a reset is performed, why even have code after the reset? Wouldn't it be more accurate (and less confusing) to just have:
<code>
void AppController::monoWakeFromSleep()
{
// Due to a software bug in the wake-up routines, we need to reset here!
// If not, Mono will go into an infinite loop!
mono::IApplicationContext::SoftwareResetToApplication();
// We never reach this point in the code, CPU has reset!
}
</code>
OK, onto the real issue... I don't want to perform a reset when the wake button is pressed, and I want to persist some data. Is there a way to do this?