1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Fixed indentation.

This commit is contained in:
Rolf Ahrenberg 2014-01-12 01:02:03 +02:00
parent 78554b53b6
commit 84572d2187

View File

@ -835,26 +835,26 @@ bool cFemonOsd::DeviceSwitch(int direction)
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
for (int i = 0; i < cDevice::NumDevices() - 1; i++) {
if (direction >= 0) {
if (++device >= cDevice::NumDevices())
device = 0;
}
else {
if (--device < 0)
device = cDevice::NumDevices() - 1;
}
if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) {
debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true);
cControl::Shutdown();
cDevice::GetDevice(device)->SwitchChannel(channel, true);
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
cDevice::GetDevice(device)->ForceTransferMode();
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true);
return (true);
}
}
if (direction >= 0) {
if (++device >= cDevice::NumDevices())
device = 0;
}
else {
if (--device < 0)
device = cDevice::NumDevices() - 1;
}
if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) {
debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true);
cControl::Shutdown();
cDevice::GetDevice(device)->SwitchChannel(channel, true);
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
cDevice::GetDevice(device)->ForceTransferMode();
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true);
return (true);
}
}
}
}
return (false);