Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
philotas
Level 7

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
philotas
Level 7

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