This code works as expected: UInt16 oldTime = SysSetAutoOffTime(0); // 0 = never autoOff PrgStartDialog(...) // Do long activity that would otherwise cause an autoOff PrgStopDialog(...) SysSetAutoOffTime( oldTime ); // Restore old value
This code does not: PrgStartDialog(...) UInt16 oldTime = SysSetAutoOffTime(0); // 0 = never autoOff // Do long activity that would otherwise cause an autoOff PrgStopDialog(...) SysSetAutoOffTime( oldTime ); // Restore old value In this second snippit, immediately upon restoring the old value of the autoOff timer, the device autoOffs! The only difference is the ordering of the first two statements. In a glance at the source code, the PrgMgr appears to eat autoOff events between StartDialog and StopDialog (unless an error dialog is displaying), but this shouldn't have anything to do with this. Is this a bug, or have I done something silly? -Jeff Ishaq Ps - I didn't forget to modify my app event loop to channel events into PrgHandleEvent(); also, for testing, I went into Prefs panel and used autoOff time of 30 seconds. Dbg msgs assure that 'oldTime' is set accordingly (to 30). -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/