aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-08-12 00:48:48 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-08-12 00:48:48 +0100
commit324dbd7fb629b53ba71700efd8697ac93166d8e9 (patch)
tree17469a84b2574768e30b5c62a6daca51ea8c2b50
parentbe07ec2ee0868931c13c178d727ee56b75699f60 (diff)
downloadimv-324dbd7fb629b53ba71700efd8697ac93166d8e9.tar.gz
Fix background color bug
-rw-r--r--src/imv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imv.c b/src/imv.c
index 9b12a79..7d660dd 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -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);