wssRegion.h = 2;
}
+ // This variable is set to true if the user pressed OK to bring the OSD on screen
+ // This is only used on old remotes to stop up/down buttons being used for osd-epg scrolling
+ okTriggeredOSD = false;
+
Colour osdBack = Colour(0, 0, 0, 128);
osd.setBackgroundColour(osdBack);
vchannelList->highlightChannel((*chanList)[currentChannelIndex]);
return 4;
}
+
+ // NEW REMOTE ONLY - navigate EPG, bring it onscreen if it's not there
case Remote::UP:
{
- // New remote only
- // epg data up
doUpDown(false);
return 2;
}
case Remote::DOWN:
{
- // New remote only
- // epg data down
doUpDown(true);
return 2;
}
case Remote::LEFT:
{
- // New remote only
- // epg data ch down
doLeftRight(false);
return 2;
}
case Remote::RIGHT:
{
- // New remote only
- // epg data ch up
doLeftRight(true);
return 2;
}
- case Remote::DF_UP:
+ // Continue new remote only...
+ case Remote::CHANNELUP:
{
- // Old remote, decide what to do based on whether the osd is showing
- if (osd.getVisible()) doUpDown(false);
- else doChanUpDown(UP);
+ doChanUpDown(UP);
return 2;
}
- case Remote::DF_DOWN:
+ case Remote::CHANNELDOWN:
{
- // Old remote, decide what to do based on whether the osd is showing
- if (osd.getVisible()) doUpDown(true);
- else doChanUpDown(DOWN);
+ doChanUpDown(DOWN);
return 2;
}
- case Remote::CHANNELUP:
+
+ // END NEW REMOTE ONLY, START OLD REMOTE ONLY
+
+ // DF_LEFT and DF_RIGHT never get here because they are stolen
+ // by command as vol- and vol+
+
+ // Old remote. Decide what to do based on whether
+ // OK was pressed - osd shown manually, use up/down for epg nav
+ // UP/DOWN was pressed to change channel, osd was shown auto, use up/down for ch+/ch-
+
+ case Remote::DF_UP:
{
- doChanUpDown(UP);
+ // Old remote, decide what to do based on okTriggeredOSD
+ if (okTriggeredOSD) doUpDown(false);
+ else doChanUpDown(UP);
return 2;
}
- case Remote::CHANNELDOWN:
+ case Remote::DF_DOWN:
{
- doChanUpDown(DOWN);
+ // Old remote, decide what to do based on okTriggeredOSD
+ if (okTriggeredOSD) doUpDown(true);
+ else doChanUpDown(DOWN);
return 2;
}
+
+ // END NEW/OLD REMOTE STUFF
+
case Remote::PREVCHANNEL:
{
channelChange(PREVIOUS, 0);
{
osdChannelIndex = currentChannelIndex;
displayOSD(true);
+ okTriggeredOSD = true;
}
}
osd.setVisible(false);
summary.setVisible(false);
+ okTriggeredOSD = false;
+
draw();
boxstack->update(this);
}
}
osd.setVisible(false);
+ okTriggeredOSD = false;
draw();
boxstack->update(this, osd.getRegion());
}