diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-08-12 00:48:48 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2019-08-12 00:48:48 +0100 |
commit | 324dbd7fb629b53ba71700efd8697ac93166d8e9 (patch) | |
tree | 17469a84b2574768e30b5c62a6daca51ea8c2b50 | |
parent | be07ec2ee0868931c13c178d727ee56b75699f60 (diff) | |
download | imv-324dbd7fb629b53ba71700efd8697ac93166d8e9.tar.gz |
Fix background color bug
-rw-r--r-- | src/imv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -627,7 +627,7 @@ void imv_install_backend(struct imv *imv, const struct imv_backend *backend) static bool parse_bg(struct imv *imv, const char *bg) { - if (strcmp("checks", bg) == 0) { + if (!strcmp("checks", bg)) { imv->background.type = BACKGROUND_CHEQUERED; } else { imv->background.type = BACKGROUND_SOLID; @@ -1181,9 +1181,9 @@ static void render_window(struct imv *imv) if (imv->background.type == BACKGROUND_SOLID) { imv_canvas_clear(imv->canvas); imv_canvas_color(imv->canvas, - imv->background.color.r, - imv->background.color.g, - imv->background.color.b, + imv->background.color.r / 255.f, + imv->background.color.g / 255.f, + imv->background.color.b / 255.f, 1.0); imv_canvas_fill(imv->canvas); imv_canvas_draw(imv->canvas); |