From: Steinar H. Gunderson Date: Mon, 11 Jul 2016 22:47:19 +0000 (+0200) Subject: Fix some broken culling code in the theme (no idea why this does not trigger more... X-Git-Tag: 1.3.2~26 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7f9371c680e0914e586f3019dcbbd3088ca2a2f6;p=nageru Fix some broken culling code in the theme (no idea why this does not trigger more often, really; it only happened in the Solskogen theme). --- diff --git a/theme.lua b/theme.lua index 495f1fc..7f47c84 100644 --- a/theme.lua +++ b/theme.lua @@ -697,10 +697,15 @@ function place_rectangle(resample_effect, resize_effect, padding_effect, x0, y0, -- Cull. if x0 > screen_width or x1 < 0.0 or y0 > screen_height or y1 < 0.0 then - resample_effect:set_int("width", 1) - resample_effect:set_int("height", 1) - resample_effect:set_float("zoom_x", screen_width) - resample_effect:set_float("zoom_y", screen_height) + if resample_effect ~= nil then + resample_effect:set_int("width", 1) + resample_effect:set_int("height", 1) + resample_effect:set_float("zoom_x", screen_width) + resample_effect:set_float("zoom_y", screen_height) + else + resize_effect:set_int("width", 1) + resize_effect:set_int("height", 1) + end padding_effect:set_int("left", screen_width + 100) padding_effect:set_int("top", screen_height + 100) return