Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MidnightJava
Visitor

Can I make the screensaver run immediately?

I'm developing a screensaver script, and every time I test I have to wait five minutes for the screensaver to activate, because that's the lowest value available in the screensaver settings menu. Is there a way to make the screen saver come on much quicker? This is a very inconvenient way to develop.
3 REPLIES 3
TheEndless
Channel Surfer

Re: Can I make the screensaver run immediately?

Unless you specifically need it to run in a separate thread while the main app runs (i.e., to get data from the main app that's not available otherwise), why not just call RunScreensaver() directly from Main()/RunUserInterface()?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
MidnightJava
Visitor

Re: Can I make the screensaver run immediately?

Thanks, I should have thought of that. And actually, running in the main thread solved a vexing problem I was having. It looked like the screensaver was failing to launch. However I was getting a black screen instead of the default screensaver (roku logo), and no debug statements were printing, even when placed as the first line in RunScreenSaver().

So when I ran the screensaver from the main thread, I saw that in fact there's a bug in one of the functions in the sample code that comes with the SDK (libScreensaver.brs#screensaverLib_CornerLocations) and when RunScreenSaver() is called from the platform it apparently swallows all the output and fails silently. I don't know if this is a problem or a feature, but it sure had me scratching my head until I ran the screensaver from the main thread and the debugger finally started talking to me.
0 Kudos
TheEndless
Channel Surfer

Re: Can I make the screensaver run immediately?

The screensaver thread can be debugged on port 8087 instead of 8085.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.