From: Steinar H. Gunderson Date: Mon, 17 Feb 2020 20:26:17 +0000 (+0100) Subject: Unbreak showing the first two channels in the tally JSON. X-Git-Tag: 1.9.2~31 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=27f5ea8eddf09244887498b61403cc8d725664ad Unbreak showing the first two channels in the tally JSON. --- diff --git a/nageru/mixer.cpp b/nageru/mixer.cpp index d213334..255f28a 100644 --- a/nageru/mixer.cpp +++ b/nageru/mixer.cpp @@ -1238,11 +1238,11 @@ void Mixer::trim_queue(CaptureCard *card, size_t safe_queue_length) pair Mixer::get_channels_json() { Channels ret; - for (int channel_idx = 2; channel_idx < theme->get_num_channels(); ++channel_idx) { + for (int channel_idx = 0; channel_idx < theme->get_num_channels(); ++channel_idx) { Channel *channel = ret.add_channel(); - channel->set_index(channel_idx); - channel->set_name(theme->get_channel_name(channel_idx)); - channel->set_color(theme->get_channel_color(channel_idx)); + channel->set_index(channel_idx + 2); + channel->set_name(theme->get_channel_name(channel_idx + 2)); + channel->set_color(theme->get_channel_color(channel_idx + 2)); } string contents; google::protobuf::util::MessageToJsonString(ret, &contents); // Ignore any errors.