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

github.com/ClusterM/retroarch-clover.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-22 17:12:08 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-22 17:12:08 +0300
commitb517753a811dbb546f53d6d0e3e6e93ec7e3ef70 (patch)
treeb64ebcc00a71d1bcbb005b1d32267531647bac29 /retroarch.hmod
parentba4ebc56ef3df0960be42f7dec868b4420a703b9 (diff)
Extension check
Diffstat (limited to 'retroarch.hmod')
-rwxr-xr-xretroarch.hmod/usr/bin/clover-kachikachi26
1 files changed, 14 insertions, 12 deletions
diff --git a/retroarch.hmod/usr/bin/clover-kachikachi b/retroarch.hmod/usr/bin/clover-kachikachi
index 92150ae..349cd76 100755
--- a/retroarch.hmod/usr/bin/clover-kachikachi
+++ b/retroarch.hmod/usr/bin/clover-kachikachi
@@ -9,28 +9,30 @@ emulator=retroarch
args=$@
filename=$1
extension=${filename##*.}
-header=$(hexdump -v -n 8 -e '1/1 "%02X"' "$filename")
-mapper=$((0x${header:14:1}${header:12:1}))
-fourscreen=$(expr $((0x${header:13:1})) / 8)
-echo mapper: $mapper
-echo four-screen: $fourscreen
+if [ "$extension" == "nes" ]; then
+ header=$(hexdump -v -n 8 -e '1/1 "%02X"' "$filename")
+ mapper=$((0x${header:14:1}${header:12:1}))
+ fourscreen=$(expr $((0x${header:13:1})) / 8)
-for m in $supported_mappers; do
- [ "$m" == "$mapper" ] && emulator=kachikachi
-done
-[ "$fourscreen" == "1" ] && emulator=retroarch
+ echo mapper: $mapper
+ echo four-screen: $fourscreen
+
+ for m in $supported_mappers; do
+ [ "$m" == "$mapper" ] && emulator=kachikachi
+ done
+ [ "$fourscreen" == "1" ] && emulator=retroarch
+fi
-# But this information is not corrent if it was FDS file or UNIF file
[ "$extension" == "fds" ] && emulator=kachikachi
-[ "$extension" == "unf" ] && emulator=retroarch
-[ "$extension" == "unif" ] && emulator=retroarch
while [ $# -gt 0 ]; do
[ "$1" == "--retroarch" ] && emulator=retroarch
[ "$1" == "--core" ] && core=$2
shift
done
+
+# Do not use retroarch for original qd games
args="$(echo $args | sed 's/--retroarch//g')"
[ "$extension" == "qd" ] && emulator=kachikachi