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: 
philotas
Roku Guru

UI does not show until screensaver is closed

I have a little app that just shows a menu bar and some items, but I need to wait for the screensaver to to turn on and then close it to see the app.
The splash screen however gets show. I am also calling show() on the screen:

Any idea?


function Main() as void
print "Main() called"
prepareAndshowChannel()
end function

sub prepareAndshowChannel()
print "prepareAndshowChannel() called"
m.MainScreen = CreateObject("roSGScreen")
MainScreen = m.MainScreen
m.port = CreateObject("roMessagePort")
m.MainScreen.setMessagePort(m.port)
m.ApplicationScreen = m.MainScreen.CreateScene("ApplicationScreen")
print "MainScreen and ApplicationScreen prepared"
m.MainScreen.show()

while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
end while

end sub
0 Kudos
1 REPLY 1
philotas
Roku Guru

Re: UI does not show until screensaver is closed [SOLVED]

I had an error in my code which I did not see in the console.
0 Kudos