The $escape+S keybinding now cycles through the available scale algorithms.
This allows the user to switch between algorithms if the automatic detection
turns out to be problematic.
The algorithms are renumbered so that 0 can be LG_SCALE_AUTO.
This commit fixes the issues with the meaning of useNearest being flipped
by removing the variable and use enumerations.
We define an enumeration EGL_DesktopScaleType to express the type of scaling
needed to be performed: no scaling, upscaling, or downscaling. This is
updated when either the frame size or the viewport size changes.
Previously, we only updated the useNearest when the frame size changes.
The desktop shader can now support an enumeration of scaling algorithms,
although only nearest and linear are currently implemented.
Like before, nearest is used when not scaling or upscaling, and linear is
used when downscaling.
We ask for 32-bit colour buffer when creating the EGL context. On Wayland,
this sometimes give contexts with alpha channels, resulting in unwanted
transparency. So we clear the alpha channel in the desktop shader.
We also switch to using constant alpha for blending the splash, which
avoids more alpha issues.
This feture is to allow the use of the key combination <super>+N to
increase the brightness of the screen when using monitors with poor
backlighting. Can help in some games.
N = Night vision