* Fix brightness set bug on new flashes.

* Bump SDL to 2.28.4
This commit is contained in:
fewtarius 2023-10-14 11:09:38 +00:00
parent 92e7fdb45e
commit c2ad1c458e
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 8 additions and 6 deletions

View file

@ -3,7 +3,7 @@
# Copyright (C) 2022-present Fewtarius
PKG_NAME="SDL2"
PKG_VERSION="2.28.2"
PKG_VERSION="2.28.4"
PKG_LICENSE="GPL"
PKG_SITE="https://www.libsdl.org/"
PKG_URL="https://www.libsdl.org/release/SDL2-${PKG_VERSION}.tar.gz"

View file

@ -8,16 +8,18 @@
BRIGHTNESS_DEV="$(find /sys/class/backlight/*/ -name brightness -print -quit)"
BRIGHTNESS_PATH="${BRIGHTNESS_DEV%/brightness}"
declare -a BRIGHTNESS_TABLE
BRIGHTNESS_TABLE=($(get_setting brightness_table))
if [ -z $BRIGHTNESS_TABLE ]; then
BRIGHTNESS_TABLE="0 0.04 0.08 0.13 0.19 0.25 0.33 0.42 0.54 0.71 1"
set_setting brightness_table "$BRIGHTNESS_TABLE"
if [ -z ${BRIGHTNESS_TABLE} ]; then
BRIGHTNESS_TABLE=(0 0.04 0.08 0.13 0.19 0.25 0.33 0.42 0.54 0.71 1)
set_setting brightness_table "${BRIGHTNESS_TABLE[*]}"
fi
NUM_STEPS=${#BRIGHTNESS_TABLE[@]}
MAX=$(<$(find /sys/class/backlight/*/ -name max_brightness -print -quit))
compute() {
echo "${BRIGHTNESS_TABLE[$NEXT]} * $MAX" | bc -l
function compute() {
echo "${BRIGHTNESS_TABLE[$NEXT]} * ${MAX}" | bc -l
}
if [ ! -f "${BRIGHTNESS_DEV}" ]