Merge pull request #1819 from r3claimer/next

Disable mangohud by default & add toggle for it
This commit is contained in:
r3claimer
2025-09-02 23:53:34 -07:00
committed by GitHub
7 changed files with 26 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ if [ ! -n "$MHUD_SET" ]; then
fi
### Check that the value sent to manghud_set is a valid selection
if [[ "$MHUD_SET" != "on" && "$MHUD_SET" != "off" && "$MHUD_SET" != "toggle" ]]; then
if [[ "$MHUD_SET" != "on" && "$MHUD_SET" != "off" && "$MHUD_SET" != "toggle" && "$MHUD_SET" != "enabled" && "$MHUD_SET" != "disabled" ]]; then
echo "$MHUD_SET is not a valid choice, valid options are on | off | toggle, setting MangoHud to off."
MHUD_SET="off"
fi
@@ -31,6 +31,14 @@ CONF_DIR="/storage/.config/MangoHud"
MANGOHUD_CONF="MangoHud.conf"
case $MHUD_SET in
"disable")
set_setting "rocknix.mangohud.enabled" "0"
echo "Disabling MangoHud"
;;
"enable")
set_setting "rocknix.mangohud.enabled" "0"
echo "Enabling MangoHud"
;;
"off")
sed -i '/no_display/c\no_display' ${CONF_DIR}/${MANGOHUD_CONF}
set_setting "rocknix.mangohud.state" "off"

View File

@@ -7,4 +7,5 @@ cat <<EOF >/storage/.config/profile.d/001-device_config
DEVICE_HAS_TOUCHSCREEN="true"
DEVICE_NO_MAC="true"
DEVICE_GPU_OVERCLOCK="true"
DEVICE_MANGOHUD_SUPPORT="true"
EOF

View File

@@ -3,9 +3,11 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2025 ROCKNIX (https://github.com/ROCKNIX)
. /etc/profile
# Enable MangoHud support
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.supported")
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.enabled")
if [ ! -n "${MANGOHUD_SUPPORTED}" ]; then
MANGOHUD_SUPPORTED="true"
set_setting "rocknix.mangohud.supported" "${MANGOHUD_SUPPORTED}"
MANGOHUD_SUPPORTED="0"
set_setting "rocknix.mangohud.enabled" "${MANGOHUD_SUPPORTED}"
fi

View File

@@ -34,6 +34,7 @@ export OS_VERSION \
DEVICE_LED_CHARGING \
DEVICE_LED_CONTROL \
DEVICE_ANALOG_STICKS_LED_CONTROL \
DEVICE_MANGOHUD_SUPPORT \
DEVICE_MMC_EJECT \
DEVICE_NO_MAC \
DEVICE_PIPEWIRE_PROFILE \

View File

@@ -395,9 +395,8 @@ ${VERBOSE} && log $0 "Set emulation performance mode to (${CPU_GOVERNOR})"
${CPU_GOVERNOR}
# Check for MangoHud support and turn MangoHud off by defualt, will add ES feature later
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.supported")
if [ "${MANGOHUD_SUPPORTED}" = "true" ]; then
/usr/bin/mangohud_set "off"
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.enabled")
if [ "${MANGOHUD_SUPPORTED}" = "1" ]; then
RUNTHIS="/usr/bin/mangohud ${RUNTHIS}"
${VERBOSE} && log $0 "Enabling MangoHud"
fi

View File

@@ -2,7 +2,7 @@
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
PKG_NAME="emulationstation"
PKG_VERSION="5258c720f8a4f0cde0ccb292cbfb854b8f1cc8b8"
PKG_VERSION="ed4a444c615af400974c24f5066a9f618ccbb3fd"
PKG_GIT_CLONE_BRANCH="master"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/ROCKNIX/emulationstation-next"

View File

@@ -7,7 +7,13 @@ PKG_SITE="https://rocknix.org"
PKG_SECTION="virtual"
PKG_LONGDESC="Game support software metapackage."
PKG_GAMESUPPORT="sixaxis rocknix-hotkey jstest-sdl gamecontrollerdb sdljoytest sdltouchtest control-gen mangohud"
PKG_GAMESUPPORT="sixaxis rocknix-hotkey jstest-sdl gamecontrollerdb sdljoytest sdltouchtest control-gen"
case ${DEVICE} in
SM8250)
PKG_GAMESUPPORT+=" mangohud"
;;
esac
# rocknix-touchscreen-keyboard requires sway
[[ "${WINDOWMANAGER}" = "swaywm-env" ]] && PKG_GAMESUPPORT+=" rocknix-touchscreen-keyboard"