mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 15:48:51 +01:00
audio ampli now started/stopped at the right times, bug corrections in snap, remount of mnt in case of error no more in ro
This commit is contained in:
parent
a0b6d3f8e8
commit
a77c5e67d9
@ -8,4 +8,4 @@ tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
|
|||||||
sysfs /sys sysfs defaults 0 0
|
sysfs /sys sysfs defaults 0 0
|
||||||
/dev/mmcblk0p3 none swap sw 0 0
|
/dev/mmcblk0p3 none swap sw 0 0
|
||||||
configfs /sys/kernel/config configfs rw,relatime 0 0
|
configfs /sys/kernel/config configfs rw,relatime 0 0
|
||||||
/dev/mmcblk0p4 /mnt vfat rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
|
/dev/mmcblk0p4 /mnt vfat rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed 0 0
|
||||||
|
|||||||
@ -41,11 +41,9 @@ resize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Start ampli if necessary
|
# Start ampli
|
||||||
echo "Start audio amplifier if necessary"
|
echo "Start audio amplifier"
|
||||||
if [[ "$(volume_get)" -ne "0" ]]; then
|
|
||||||
start_audio_amp 1 >/dev/null 2>&1
|
start_audio_amp 1 >/dev/null 2>&1
|
||||||
fi
|
|
||||||
|
|
||||||
# Force unmute sound card and reset volume
|
# Force unmute sound card and reset volume
|
||||||
echo "Force unmute sound card and reset volume"
|
echo "Force unmute sound card and reset volume"
|
||||||
|
|||||||
@ -12,19 +12,20 @@ fi
|
|||||||
# Lock file (necessary since fbgrab must run in bg not to block the buttons while gaming)
|
# Lock file (necessary since fbgrab must run in bg not to block the buttons while gaming)
|
||||||
LOCK_FILE="/var/lock/snap.lock"
|
LOCK_FILE="/var/lock/snap.lock"
|
||||||
if [ -f "${LOCK_FILE}" ]; then
|
if [ -f "${LOCK_FILE}" ]; then
|
||||||
#echo "${LOCK_FILE} already exists"
|
echo "${LOCK_FILE} already exists"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
touch "${LOCK_FILE}"
|
touch "${LOCK_FILE}"
|
||||||
|
|
||||||
# Increment name and save snapshot
|
# Increment name and save snapshot
|
||||||
SNAPSHOT_DIR=/mnt/funkey/snapshots
|
SNAPSHOT_DIR=/mnt/funkey/snapshots
|
||||||
|
SNAPSHOT_EXT=PNG
|
||||||
mkdir -p "${SNAPSHOT_DIR}"
|
mkdir -p "${SNAPSHOT_DIR}"
|
||||||
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.PNG 2> /dev/null | tail -1 | sed 's/^IMG_0*\([0-9]\+\)\.PNG$/\1/')
|
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.${SNAPSHOT_EXT} 2> /dev/null | tail -1 | sed 's/^IMG_0*\([0-9]\+\)\.'${SNAPSHOT_EXT}'$/\1/')
|
||||||
let last=${last}+1
|
let last=${last}+1
|
||||||
snapshot_file=$(printf "IMG_%04d.PNG" $last)
|
snapshot_file=$(printf "IMG_%04d.${SNAPSHOT_EXT}" $last)
|
||||||
notif_set 2 " NEW SCREEENSHOT ${snapshot_file}"
|
notif_set 2 " SCREEENSHOT ${snapshot_file}"
|
||||||
fbgrab "${SNAPSHOT_DIR}/${snapshot_file}" &
|
fbgrab "${SNAPSHOT_DIR}/${snapshot_file}" >/dev/null 2>&1 &
|
||||||
|
|
||||||
# Remove lock file
|
# Remove lock file
|
||||||
rm -f "${LOCK_FILE}"
|
rm -f "${LOCK_FILE}"
|
||||||
|
|||||||
@ -6,10 +6,16 @@ if [ ${#} -ne 1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check Enable arg
|
# Check enable arg
|
||||||
enable=${1}
|
enable=${1}
|
||||||
if [ ${enable} -eq 1 ]; then
|
if [ ${enable} -eq 1 ]; then
|
||||||
|
|
||||||
|
# Turn ON only if volume is not null
|
||||||
|
if [ "$(volume_get)" -ne "0" ]; then
|
||||||
echo "Turning audio amplifier ON"
|
echo "Turning audio amplifier ON"
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
elif [ ${enable} -eq 0 ]; then
|
elif [ ${enable} -eq 0 ]; then
|
||||||
echo "Turning audio amplifier OFF"
|
echo "Turning audio amplifier OFF"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -39,9 +39,6 @@ while true; do
|
|||||||
else
|
else
|
||||||
if [ -f "${GMENU2X_FILE}" ]; then
|
if [ -f "${GMENU2X_FILE}" ]; then
|
||||||
|
|
||||||
# Force stop ampli (no sound in gmenu2x)
|
|
||||||
start_audio_amp 0
|
|
||||||
|
|
||||||
# Launch gmenu2x
|
# Launch gmenu2x
|
||||||
gmenu2x&
|
gmenu2x&
|
||||||
else
|
else
|
||||||
|
|||||||
@ -20,9 +20,9 @@ while true; do
|
|||||||
if [ ${perform} -eq 1 ]; then
|
if [ ${perform} -eq 1 ]; then
|
||||||
|
|
||||||
# Compute stats
|
# Compute stats
|
||||||
cpu=$(printf "%.1f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
||||||
ram_mem=$(printf "%.1f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
||||||
ram_swap=$(printf "%.1f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
|
ram_swap=$(printf "%.0f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
|
||||||
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
||||||
|
|
||||||
# Notif
|
# Notif
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
FCEUX_VERSION = addf9a3
|
FCEUX_VERSION = dd70596
|
||||||
FCEUX_SITE_METHOD = git
|
FCEUX_SITE_METHOD = git
|
||||||
FCEUX_SITE = https://github.com/FunKey-Project/fceux.git
|
FCEUX_SITE = https://github.com/FunKey-Project/fceux.git
|
||||||
FCEUX_LICENSE = GPL-2.0
|
FCEUX_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PCSX_REARMED_VERSION = 048e75a
|
PCSX_REARMED_VERSION = 65524b1
|
||||||
PCSX_REARMED_SITE_METHOD = git
|
PCSX_REARMED_SITE_METHOD = git
|
||||||
PCSX_REARMED_SITE = https://github.com/FunKey-Project/pcsx_rearmed.git
|
PCSX_REARMED_SITE = https://github.com/FunKey-Project/pcsx_rearmed.git
|
||||||
PCSX_REARMED_LICENSE = GPL-2.0
|
PCSX_REARMED_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# gmenu2x
|
# gmenu2x
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
GMENU2X_VERSION = 4220f3a
|
GMENU2X_VERSION = 85402aa
|
||||||
GMENU2X_SITE_METHOD = git
|
GMENU2X_SITE_METHOD = git
|
||||||
GMENU2X_SITE = https://github.com/FunKey-Project/gmenu2x.git
|
GMENU2X_SITE = https://github.com/FunKey-Project/gmenu2x.git
|
||||||
GMENU2X_LICENSE = GPL-2.0
|
GMENU2X_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GNUBOY_VERSION = 63fcd82
|
GNUBOY_VERSION = 739c975
|
||||||
GNUBOY_SITE_METHOD = git
|
GNUBOY_SITE_METHOD = git
|
||||||
GNUBOY_SITE = https://github.com/FunKey-Project/gnuboy.git
|
GNUBOY_SITE = https://github.com/FunKey-Project/gnuboy.git
|
||||||
GNUBOY_LICENSE = GPL-2.0
|
GNUBOY_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GPSP_VERSION = fd81d8a
|
GPSP_VERSION = f0728b4
|
||||||
GPSP_SITE_METHOD = git
|
GPSP_SITE_METHOD = git
|
||||||
GPSP_SITE = https://github.com/FunKey-Project/gpsp.git
|
GPSP_SITE = https://github.com/FunKey-Project/gpsp.git
|
||||||
GPSP_LICENSE = GPL-2.0
|
GPSP_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
MEDNAFEN_VERSION =f4755e3
|
MEDNAFEN_VERSION = f873a3b
|
||||||
MEDNAFEN_SITE_METHOD = git
|
MEDNAFEN_SITE_METHOD = git
|
||||||
MEDNAFEN_SITE = https://github.com/FunKey-Project/mednafen-git.git
|
MEDNAFEN_SITE = https://github.com/FunKey-Project/mednafen-git.git
|
||||||
MEDNAFEN_LICENSE = GPL-2.0+
|
MEDNAFEN_LICENSE = GPL-2.0+
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PICODRIVE_VERSION = e37c0fa
|
PICODRIVE_VERSION = f3d4a3a
|
||||||
PICODRIVE_SITE_METHOD = git
|
PICODRIVE_SITE_METHOD = git
|
||||||
PICODRIVE_SITE = https://github.com/FunKey-Project/picodrive.git
|
PICODRIVE_SITE = https://github.com/FunKey-Project/picodrive.git
|
||||||
PICODRIVE_LICENSE = MAME
|
PICODRIVE_LICENSE = MAME
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user