Forum Discussion
EnTerr
12 years agoRoku Guru
360tv, in your specific case just pass the screen as argument to `launchPlayer()` and use that inside (draw, run message loop on already existing port etc) like so:
In addition this will save memory. A roScreen necessarily takes lots of memory. I am guesstimating ~7MB for HD. The only catch is on return will have to re-draw the screen... which i see you do on every loop, so all's swell.
Function Main() as void
loadscreen = CreateObject("roScreen" , true)
...
if (id = 6)
'***** OK
launchPlayer(loadScreen)
end if
...
End Function
function launchPlayer(playerScreen)
port = playerScreen.getPort() '.getPort()/setPort() work on both old and new fw
...
end function
In addition this will save memory. A roScreen necessarily takes lots of memory. I am guesstimating ~7MB for HD. The only catch is on return will have to re-draw the screen... which i see you do on every loop, so all's swell.