X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=nageru%2Ftheme.lua;h=e117e62949f4472e736fe03574fbfaf5fc50e8ea;hp=0bbb7194a6eb8c2ff9151739c47fb5e55d9c12aa;hb=ca090e45b28fed464008086fbe3db19437c115dd;hpb=67bcd1fb516072bf48e4ac140b057f74a31edba0 diff --git a/nageru/theme.lua b/nageru/theme.lua index 0bbb719..e117e62 100644 --- a/nageru/theme.lua +++ b/nageru/theme.lua @@ -401,9 +401,9 @@ 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(0) -- High-quality resampling (ResampleEffect) + simple_scene.resample_effect:choose_alternative(ResampleEffect) -- High-quality resampling. else - simple_scene.resample_effect:choose_alternative(1) -- Low-quality resampling (ResizeEffect) + simple_scene.resample_effect:choose_alternative(ResizeEffect) -- Low-quality resampling. end simple_scene.resample_effect:set_int("width", width) simple_scene.resample_effect:set_int("height", height) @@ -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(1) -- Low-quality resizing. + input.resample_switcher:choose_alternative(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(0) + input.resample_switcher:choose_alternative(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(1) + input.resample_switcher:choose_alternative(ResizeEffect) local width = round(x1 - x0) local height = round(y1 - y0)