]> git.sesse.net Git - nageru/commitdiff
Unbreak showing the first two channels in the tally JSON.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 17 Feb 2020 20:26:17 +0000 (21:26 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 17 Feb 2020 20:26:17 +0000 (21:26 +0100)
nageru/mixer.cpp

index d2133346f33d005d87bf392c58e9589914b293b7..255f28a91b315b550a130e4d67ebd48f44f231a1 100644 (file)
@@ -1238,11 +1238,11 @@ void Mixer::trim_queue(CaptureCard *card, size_t safe_queue_length)
 pair<string, string> 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.