Screensaver: Unbreak screensaver_stretch_images (#7403)

* Screensaver: Unbreak screensaver_stretch_images

We don't have real ternary operators in Lua, if the second argument evaluates to false, it doesn't work.
Invert the test to avoid this pitfall.
(c.f., http://lua-users.org/wiki/TernaryOperator).

Fix #7402, regression since #7371

* Free a few similar constructs (incidentally, some of 'em also tweaked in #7371 ^^).
This commit is contained in:
NiLuJe
2021-03-10 02:14:26 +01:00
committed by GitHub
parent 0674e6060a
commit 601d2fc3d2
3 changed files with 9 additions and 9 deletions

View File

@@ -111,7 +111,7 @@ function ReaderTypeset:onReadSettings(config)
self.smooth_scaling = config:isTrue("smooth_scaling")
else
local global = G_reader_settings:readSetting("copt_smooth_scaling")
self.smooth_scaling = (global == nil or global == 0) and false or true
self.smooth_scaling = global == 1 and true or false
end
self:toggleImageScaling(self.smooth_scaling)