* Fix brightness set bug on new flashes.
* Bump SDL to 2.28.4
This commit is contained in:
parent
92e7fdb45e
commit
c2ad1c458e
2 changed files with 8 additions and 6 deletions
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (C) 2022-present Fewtarius
|
# Copyright (C) 2022-present Fewtarius
|
||||||
|
|
||||||
PKG_NAME="SDL2"
|
PKG_NAME="SDL2"
|
||||||
PKG_VERSION="2.28.2"
|
PKG_VERSION="2.28.4"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="https://www.libsdl.org/"
|
PKG_SITE="https://www.libsdl.org/"
|
||||||
PKG_URL="https://www.libsdl.org/release/SDL2-${PKG_VERSION}.tar.gz"
|
PKG_URL="https://www.libsdl.org/release/SDL2-${PKG_VERSION}.tar.gz"
|
||||||
|
|
|
@ -8,16 +8,18 @@
|
||||||
|
|
||||||
BRIGHTNESS_DEV="$(find /sys/class/backlight/*/ -name brightness -print -quit)"
|
BRIGHTNESS_DEV="$(find /sys/class/backlight/*/ -name brightness -print -quit)"
|
||||||
BRIGHTNESS_PATH="${BRIGHTNESS_DEV%/brightness}"
|
BRIGHTNESS_PATH="${BRIGHTNESS_DEV%/brightness}"
|
||||||
|
|
||||||
|
declare -a BRIGHTNESS_TABLE
|
||||||
BRIGHTNESS_TABLE=($(get_setting brightness_table))
|
BRIGHTNESS_TABLE=($(get_setting brightness_table))
|
||||||
if [ -z $BRIGHTNESS_TABLE ]; then
|
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"
|
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"
|
set_setting brightness_table "${BRIGHTNESS_TABLE[*]}"
|
||||||
fi
|
fi
|
||||||
NUM_STEPS=${#BRIGHTNESS_TABLE[@]}
|
NUM_STEPS=${#BRIGHTNESS_TABLE[@]}
|
||||||
|
|
||||||
MAX=$(<$(find /sys/class/backlight/*/ -name max_brightness -print -quit))
|
MAX=$(<$(find /sys/class/backlight/*/ -name max_brightness -print -quit))
|
||||||
compute() {
|
function compute() {
|
||||||
echo "${BRIGHTNESS_TABLE[$NEXT]} * $MAX" | bc -l
|
echo "${BRIGHTNESS_TABLE[$NEXT]} * ${MAX}" | bc -l
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -f "${BRIGHTNESS_DEV}" ]
|
if [ ! -f "${BRIGHTNESS_DEV}" ]
|
||||||
|
|
Loading…
Reference in a new issue