X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fsplitscreen.cpp;h=1a39df44efa472974dde8dc903bb6679b4627a35;hb=cad5aff5a3a21bb8c95d8a265e93687234f46a43;hp=e4bb4c441155ec962ee92a0ec2366f3607c04c4b;hpb=09ae4d8636130d4c86ab3f8df8f823482f948f97;p=ccbs diff --git a/bigscreen/splitscreen.cpp b/bigscreen/splitscreen.cpp index e4bb4c4..1a39df4 100644 --- a/bigscreen/splitscreen.cpp +++ b/bigscreen/splitscreen.cpp @@ -1,7 +1,9 @@ /* NOTE: this class will _NOT_ handle resolution changes cleanly. You have been warned. :-) */ #include +#include #include "splitscreen.h" +#include "theme.h" SplitScreen::SplitScreen(GenericScreen *s1, GenericScreen *s2, GenericScreen *s3, GenericScreen *s4) : valid(false) @@ -50,19 +52,23 @@ void SplitScreen::draw(unsigned char *buf, unsigned width, unsigned height) copy_subscreen(buf + width * (height/2) * 4 + (width/2) * 4, subbufs[3], width, height); // make divider lines + int r = atoi(get_theme_config("divider", "red").c_str()); + int g = atoi(get_theme_config("divider", "green").c_str()); + int b = atoi(get_theme_config("divider", "blue").c_str()); + unsigned char *ptr = buf + (height/2) * width * 4; for (unsigned x = 0; x < width; ++x) { - *ptr++ = 255; - *ptr++ = 255; - *ptr++ = 255; + *ptr++ = b; + *ptr++ = g; + *ptr++ = r; *ptr++ = 0; } ptr = buf + (width/2) * 4; for (unsigned y = 0; y < height; ++y) { - ptr[0] = 255; - ptr[1] = 255; - ptr[2] = 255; + ptr[0] = b; + ptr[1] = g; + ptr[2] = r; ptr[3] = 0; ptr += width * 4;