#!/bin/sh

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2025 ArchR (https://github.com/archr-linux/Arch-R)

. /etc/profile

# Enable MangoHud support
MANGOHUD_SUPPORTED=$(get_setting "archr.mangohud.enabled")
if [ ! -n "${MANGOHUD_SUPPORTED}" ]; then
  MANGOHUD_SUPPORTED="0"
  set_setting "archr.mangohud.enabled" "${MANGOHUD_SUPPORTED}"
fi

cat <<EOF >/storage/.config/profile.d/075-mangohud-supported
# Device Features
DEVICE_MANGOHUD_SUPPORT="true"
EOF
