Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'user_mods/remove_thumbnails.hmod/install')
-rw-r--r--user_mods/remove_thumbnails.hmod/install14
1 files changed, 13 insertions, 1 deletions
diff --git a/user_mods/remove_thumbnails.hmod/install b/user_mods/remove_thumbnails.hmod/install
index 6ecd1d93..36bb171c 100644
--- a/user_mods/remove_thumbnails.hmod/install
+++ b/user_mods/remove_thumbnails.hmod/install
@@ -1,8 +1,14 @@
# Lines started with "#" are ignored and can be used as comments
+
# Next line defines "scnfile" variable with path to "sys_game_thumbnail.scn" file
-scnfile=/usr/share/clover-ui/resources/prefab/sys_game_thumbnail.scn
+# It's more complicated since SNES Mini relased. Path is defferent for NES Mini and SNES Mini.
+# Lets try to find it
+scnfile=$(find $mountpoint/ -name "sys_game_thumbnail.scn") && scnfile=${scnfile:${#mountpoint}}
# Same with nes.json file
nesjson=/usr/share/clover-ui/resources/sprites/nes.json
+# But nes.json exists on NES Mini only, otherwise we need packed.json
+[ ! -f "$nesjson" ] && nesjson=$(find $mountpoint/ -name "packed.json") && nesjson=${nesjson:${#mountpoint}}
+
# This line defines "preinitfile" variable with pre-init file name
preinitfile=p81a8_hide_thumnbnails
# "restore" is hakchi function which copies original file to corresponding path in /var/lib/hakchi/rootfs
@@ -12,9 +18,15 @@ restore $nesjson
# Please note that we need to edit $rootfs$scnfile (writable file), not a just $scnfile (original read-only file)
sed -i -e 's/"enabled":true/"enabled":false/g' $rootfs$scnfile
# Same with nes.json file, most simple way is to replace coordinates sprite coords with zeros
+# For NES Mini
sed -i -e 's/\[93,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[93,871,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[107,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+# For SNES Mini
+sed -i -e 's/\[145,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+sed -i -e 's/\[159,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+sed -i -e 's/\[173,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+
# Create pre-init script and echo "overmount" command to it
echo "overmount $scnfile" > $preinitpath/$preinitfile
echo "overmount $nesjson" >> $preinitpath/$preinitfile