Dear all, More questions from a newbie, I'm afraid :). The method below seems to be the best way to frame these questions:-
What I'm doing... Writing a strategy game where the user will probably be sitting and thinking for long periods as opposed to tapping the screen. During this period, the game will likely spend 9/10ths of the time in "processor doze"-mode. The Problem... Screen will annoyingly auto-power off after a while, without warning. However, I don't want to remove the autopower-off completely, nor increase it to a large amount (in case the user forgets to power off the unit whilst not playing). What I Want To Do... Have a "snooze" symbol appear, with a countdown until power off, at about 10 seconds before the unit powers off. (I can handle all the graphics and stuff, here). Power-off can be aborted by tapping the screen. -------------------- So in essence, what I want to do is warn the user that the until will auto-switch-off about 10 seconds in advance. I see two approaches:- 1) Log the amount of time since the last switch off occured. When this gets to within 10 seconds of the "Auto-turn off after..." length of time, warn the user. ** Questions for this approach:- ** How do I set/ access the "Auto-turn off after..." value? More importantly, does the time spent in processor doze mode count as progress towards the "Auto-turn-off" point ( I need to know this in order to predict when the "Auto-power-off" event will be dispatched)? 2) Intercept and discard the built-in "Auto-turn-off" events, and "simulate" my own; i.e. keep track of the amount of time elapsed (using TimGetSeconds(), which I assume updates even in processor-doze mode) since last penDownEvent/ power-off event, pop-up the warning, and after the countdown reaches zero, power the unit off myself. ** Questions for this approach:- ** How do I tell the unit to switch off? Hope someone can help me out here; the questions aren't urgent, since just turning the unit on every time it powers off isn't too much of a chore for the user. However, the method above seems to be a slightly "slicker" way too proceed. Many thanks in advance, Simon _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
