diff --git a/PortMaster/device_info.txt b/PortMaster/device_info.txt index eae1725..9f38c2e 100755 --- a/PortMaster/device_info.txt +++ b/PortMaster/device_info.txt @@ -49,7 +49,11 @@ fi CFW_NAME="Unknown" CFW_VERSION="Unknown" -if [ -f "/usr/share/plymouth/themes/text.plymouth" ]; then +if [ -f "/loong/loong_version" ]; then + CFW_NAME="Loong" + CFW_VERSION=$(cat /loong/loong_version 2>/dev/null | grep -o '"verShow"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4) + [ -z "$CFW_VERSION" ] && CFW_VERSION="Unknown" +elif [ -f "/usr/share/plymouth/themes/text.plymouth" ]; then CFW_INFO=$(grep "title=" "/usr/share/plymouth/themes/text.plymouth") CFW_FFS=$(grep -a "title=" "/usr/share/plymouth/themes/text.plymouth" | cut -d'=' -f 2- | tr -cd 'a-zA-Z' | tr '[:upper:]' '[:lower:]') diff --git a/PortMaster/mod_Loong.txt b/PortMaster/mod_Loong.txt new file mode 100644 index 0000000..58516dc --- /dev/null +++ b/PortMaster/mod_Loong.txt @@ -0,0 +1,30 @@ +#!/bin/bash +# +# SPDX-License-Identifier: MIT +# + +## Modular - Loong +# +# A modular file that is sourced for specific script lines required by ports running on MiniLoong. +# +# usage `[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"` + +# Set virtual screen +CUR_TTY="/dev/fd/1" + +# Use for Godot 2 +GODOT2_OPTS="-r ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f" + +# Use for Godot 3+ +GODOT_OPTS="--resolution ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f" + +export directory="mnt/sdcard/roms" + +pm_platform_helper() { + if [ -e "$PM_PIPE" ]; then + PortMasterDialogExit + fi + + # DO SOMETHING HERE + printf "" +}