X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fsplitscreen.cpp;h=1a39df44efa472974dde8dc903bb6679b4627a35;hb=bbbf0f34d43aa3b6f43225fb6c2d45566a423ab1;hp=b2939be755e2769eef5656bf0bd1e036a6388978;hpb=d4ec885cadcbcce077579bdd24c93ead18b06852;p=ccbs diff --git a/bigscreen/splitscreen.cpp b/bigscreen/splitscreen.cpp index b2939be..1a39df4 100644 --- a/bigscreen/splitscreen.cpp +++ b/bigscreen/splitscreen.cpp @@ -1,8 +1,9 @@ /* NOTE: this class will _NOT_ handle resolution changes cleanly. You have been warned. :-) */ #include +#include #include "splitscreen.h" -#include "design.h" +#include "theme.h" SplitScreen::SplitScreen(GenericScreen *s1, GenericScreen *s2, GenericScreen *s3, GenericScreen *s4) : valid(false) @@ -51,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++ = DIVIDER_BLUE; - *ptr++ = DIVIDER_GREEN; - *ptr++ = DIVIDER_RED; + *ptr++ = b; + *ptr++ = g; + *ptr++ = r; *ptr++ = 0; } ptr = buf + (width/2) * 4; for (unsigned y = 0; y < height; ++y) { - ptr[0] = DIVIDER_BLUE; - ptr[1] = DIVIDER_GREEN; - ptr[2] = DIVIDER_RED; + ptr[0] = b; + ptr[1] = g; + ptr[2] = r; ptr[3] = 0; ptr += width * 4;