From 607c42277627e60f8f924e3408ec37220d81f145 Mon Sep 17 00:00:00 2001 From: mason Date: Tue, 3 Jan 2023 14:37:08 +0000 Subject: [PATCH] Add Citrasa ES features. --- .../emulators/citrasa/scripts/start_citra.sh | 63 +++++++++++++++++++ .../config/common/es_features.cfg | 17 +++++ 2 files changed, 80 insertions(+) diff --git a/packages/games/emulators/citrasa/scripts/start_citra.sh b/packages/games/emulators/citrasa/scripts/start_citra.sh index 1a1e0e57c..19f41b856 100644 --- a/packages/games/emulators/citrasa/scripts/start_citra.sh +++ b/packages/games/emulators/citrasa/scripts/start_citra.sh @@ -10,6 +10,69 @@ if [ ! -d "/storage/.config/citra-emu" ]; then cp -r "/usr/config/citra-emu" "/storage/.config/" fi +#Move sdmc & nand to 3ds roms folder +if [ ! -d "/storage/roms/3ds/citrasa/sdmc" ]; then + mkdir -p "/storage/roms/3ds/citrasa/sdmc" +fi + +rm -rf /storage/.config/citra-emu/sdmc +ln -sf /storage/roms/3ds/citrasa/sdmc /storage/.config/citra-emu/sdmc + +if [ ! -d "/storage/roms/3ds/citrasa/nand" ]; then + mkdir -p "/storage/roms/3ds/citrasa/nand" +fi + +rm -rf /storage/.config/citra-emu/nand +ln -sf /storage/roms/3ds/citrasa/nand /storage/.config/citra-emu/nand + + + #Emulation Station Features + GAME=$(echo "${1}"| sed "s#^/.*/##") + RES=$(get_setting resolution_scale 3ds "${GAME}") + SLAYOUT=$(get_setting screen_layout 3ds "${GAME}") + + #Resolution Scale + if [ "$RES" = "0" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$RES" = "1" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 1' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$RES" = "2" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 2' /storage/.config/citra-emu/sdl2-config.ini + fi + + #Screen Layout + if [ "$SLAYOUT" = "0" ] + then + sed -i '/layout_option =/c\layout_option = 0' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "1a" ] + then + sed -i '/layout_option =/c\layout_option = 1' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "1b" ] + then + sed -i '/layout_option =/c\layout_option = 1' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 1' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "2" ] + then + sed -i '/layout_option =/c\layout_option = 2' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "3" ] + then + sed -i '/layout_option =/c\layout_option = 3' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + + rm -rf /storage/.local/share/citra-emu ln -sfv /storage/.config/citra-emu /storage/.local/share/citra-emu diff --git a/packages/ui/emulationstation/config/common/es_features.cfg b/packages/ui/emulationstation/config/common/es_features.cfg index 49513a274..18c83f78b 100644 --- a/packages/ui/emulationstation/config/common/es_features.cfg +++ b/packages/ui/emulationstation/config/common/es_features.cfg @@ -200,6 +200,23 @@ + + + + + + + + + + + + + + + + +