X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.lua;h=172b91d371ad6a525f74560d68ed7a5bc87f70db;hb=d3f363c0ac414e696844d277b34a79dd414c19e2;hp=e117e62949f4472e736fe03574fbfaf5fc50e8ea;hpb=ca090e45b28fed464008086fbe3db19437c115dd;p=nageru diff --git a/nageru/theme.lua b/nageru/theme.lua index e117e62..172b91d 100644 --- a/nageru/theme.lua +++ b/nageru/theme.lua @@ -401,14 +401,14 @@ function setup_simple_input(state, signals, signal_num, width, height, hq) simple_scene.input:display(signal_num) if needs_scale(signals, signal_num, width, height) then if hq then - simple_scene.resample_effect:choose_alternative(ResampleEffect) -- High-quality resampling. + simple_scene.resample_effect:choose(ResampleEffect) -- High-quality resampling. else - simple_scene.resample_effect:choose_alternative(ResizeEffect) -- Low-quality resampling. + simple_scene.resample_effect:choose(ResizeEffect) -- Low-quality resampling. end simple_scene.resample_effect:set_int("width", width) simple_scene.resample_effect:set_int("height", height) else - simple_scene.resample_effect:choose_alternative(2) -- No scaling. + simple_scene.resample_effect:disable() -- No scaling. end set_neutral_color_from_signal(state, simple_scene.wb_effect, signal_num) end @@ -509,7 +509,7 @@ function place_rectangle(input, x0, y0, x1, y1, screen_width, screen_height, inp -- Cull. if x0 > screen_width or x1 < 0.0 or y0 > screen_height or y1 < 0.0 then - input.resample_switcher:choose_alternative(ResizeEffect) -- Low-quality resizing. + input.resample_switcher:choose(ResizeEffect) -- Low-quality resizing. input.resize_effect:set_int("width", 1) input.resize_effect:set_int("height", 1) input.padding_effect:set_int("left", screen_width + 100) @@ -542,7 +542,7 @@ function place_rectangle(input, x0, y0, x1, y1, screen_width, screen_height, inp if hq then -- High-quality resampling. - input.resample_switcher:choose_alternative(ResampleEffect) + input.resample_switcher:choose(ResampleEffect) local x_subpixel_offset = x0 - math.floor(x0) local y_subpixel_offset = y0 - math.floor(y0) @@ -578,7 +578,7 @@ function place_rectangle(input, x0, y0, x1, y1, screen_width, screen_height, inp input.padding_effect:set_float("border_offset_bottom", y1 - (math.floor(y0) + height)) else -- Lower-quality simple resizing. - input.resample_switcher:choose_alternative(ResizeEffect) + input.resample_switcher:choose(ResizeEffect) local width = round(x1 - x0) local height = round(y1 - y0)