Always request active group before performing operations in main loop
This commit is contained in:
parent
6c03736e41
commit
59370a2d4a
|
@ -200,6 +200,7 @@ sub Main (args as dynamic) as void
|
||||||
else if isNodeEvent(msg, "buttonSelected")
|
else if isNodeEvent(msg, "buttonSelected")
|
||||||
' If a button is selected, we have some determining to do
|
' If a button is selected, we have some determining to do
|
||||||
btn = getButton(msg)
|
btn = getButton(msg)
|
||||||
|
group = groupStack.callFunc("peek")
|
||||||
if btn <> invalid and btn.id = "play-button"
|
if btn <> invalid and btn.id = "play-button"
|
||||||
' Check is a specific Audio Stream was selected
|
' Check is a specific Audio Stream was selected
|
||||||
audio_stream_idx = 1
|
audio_stream_idx = 1
|
||||||
|
@ -207,8 +208,6 @@ sub Main (args as dynamic) as void
|
||||||
audio_stream_idx = group.selectedAudioStreamIndex
|
audio_stream_idx = group.selectedAudioStreamIndex
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' TODO - Do a better job of picking the last focus
|
|
||||||
' This is currently page layout Group, button Group, then button
|
|
||||||
video_id = group.id
|
video_id = group.id
|
||||||
video = CreateVideoPlayerGroup(video_id, audio_stream_idx)
|
video = CreateVideoPlayerGroup(video_id, audio_stream_idx)
|
||||||
if video <> invalid
|
if video <> invalid
|
||||||
|
@ -240,6 +239,7 @@ sub Main (args as dynamic) as void
|
||||||
end if
|
end if
|
||||||
else if isNodeEvent(msg, "optionSelected")
|
else if isNodeEvent(msg, "optionSelected")
|
||||||
button = msg.getRoSGNode()
|
button = msg.getRoSGNode()
|
||||||
|
group = groupStack.callFunc("peek")
|
||||||
if button.id = "goto_search"
|
if button.id = "goto_search"
|
||||||
' Exit out of the side panel
|
' Exit out of the side panel
|
||||||
panel.visible = false
|
panel.visible = false
|
||||||
|
@ -293,6 +293,7 @@ sub Main (args as dynamic) as void
|
||||||
end if
|
end if
|
||||||
else if type(msg) = "roDeviceInfoEvent"
|
else if type(msg) = "roDeviceInfoEvent"
|
||||||
event = msg.GetInfo()
|
event = msg.GetInfo()
|
||||||
|
group = groupStack.callFunc("peek")
|
||||||
if event.exitedScreensaver = true
|
if event.exitedScreensaver = true
|
||||||
m.overhang.callFunc("resetTime")
|
m.overhang.callFunc("resetTime")
|
||||||
if group.subtype() = "Home"
|
if group.subtype() = "Home"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user