I hope I'm doing something wrong, but if I have an roScreen open and the screen saver kicks in the screen basically is frozen once the screen saver is dismissed. The code still appears to be operating properly, but no updates appear on the screen. On a 1st generation unit everything works just fine (including getting the screen saver to display instead of just a blank screen). Here's some basic code that illustrates the problem:
Sub RunUserInterface()
screenFacade = CreateObject("roPosterScreen")
screenFacade.showMessage("")
screenFacade.show()
port = CreateObject("roMessagePort")
screenFacade.SetMessagePort(port)
di = CreateObject("roDeviceInfo")
m.dsize = di.GetDisplaySize()
if m.dsize.w = 1280 then
m.screen = CreateObject("roScreen")
else
m.screen = CreateObject("roScreen",false,640,480)
end if
if type(m.screen) <> "roScreen"
print "Unable to open screen"
return
end if
m.screen.SetPort(port)
m.screen.SetAlphaEnable(true)
m.screen.Clear(&h108010FF)
m.screen.Finish()
m.compositor = CreateObject("roCompositor")
m.compositor.SetDrawTo(m.screen, &h108010FF)
bm = CreateObject("roBitmap", {width:50, height:50, AlphaEnable:true})
bm.Clear(&h801010FF)
region = CreateObject("roRegion",bm,0,0,bm.GetWidth(),bm.GetHeight())
sprite = m.compositor.NewSprite(0,0,region)
print type(sprite)
while true
msg = wait(1000,port)
print "Moving..."
sprite.MoveTo(rnd(m.dsize.w-bm.GetWidth()),rnd(m.dsize.h-bm.GetHeight()))
m.compositor.Draw()
m.screen.Finish()
end while
End Sub
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.