"destruk" wrote:
I truly apologize for my behavior here. I understand why they want it done this way, and it's not difficult to change.
I do have another question though - how can I prevent the screensaver from activating during the linking process? I left a roku on the link screen last night, all night, and noticed a logged request and registration code from it on the server today so I deleted the record. 30 seconds later the record reappeared in the table - so I checked and the screensaver was active on the box. I was under the impression if the screensaver turned on, processing of the channel code would be paused, so how can I prevent execution when the screensaver is active?
The way I think most people deal with determining when the screen save is active is including a custom screen saver with the app, and writing/updating a file in tmp:/ when it starts. The main program can check for the existence and content (to make sure it's recent) of this to determine whether the screensaver is running. I haven't done much with this, but I'm pretty sure TheEndless and renojim have used this method.
If you really just want to stop something from happening in the main code after a set period (and it doesn't really matter whether the screensaver is running, per-se), create an roTimespan object and update it on every msg (or every msg that entails user input), and if you've been idle too long, don't do the stuff you don't feel like...