73dff6fa94
* Add support for RG353V (use RG353P image, enable switch in system settings). * Fix language selection bug. * Fix another brightness bug. * Fix shader build conflict. * Force Retroarch to use glcore on the RG552 if GL is still enabled.
22 lines
568 B
Bash
Executable file
22 lines
568 B
Bash
Executable file
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
. /etc/profile
|
|
|
|
BRIGHTNESS_DEV="$(ls /sys/class/backlight)"
|
|
|
|
### Variables may need to be device specific here.
|
|
BRIGHTNESS=$(get_setting system.brightness)
|
|
if [[ ! "${BRIGHTNESS}" =~ [0-9] ]]
|
|
then
|
|
BRIGHTNESS=${DEVICE_BRIGHTNESS}
|
|
fi
|
|
|
|
# Ensure user doesn't get "locked out" with super low brightness
|
|
if [[ "${BRIGHTNESS}" -lt "3" ]]
|
|
then
|
|
BRIGHTNESS=3
|
|
fi
|
|
|
|
printf "%.0f" $(echo "${BRIGHTNESS}") > /sys/class/backlight/${BRIGHTNESS_DEV}/brightness
|