Volkov: адаптировать тайминги MAME 0.287 и таймаут на macOS

This commit is contained in:
2026-09-15 17:57:20 +03:00
parent 8e389c03f8
commit 50c6e56b7b
7 changed files with 42 additions and 12 deletions
+14 -1
View File
@@ -22,7 +22,20 @@ if pgrep -fl 'mame[^ ]* sprinter( |$)' | grep . >/dev/null 2>&1; then
fi
cd "$MAME_DIR"
exec timeout "$TIMEOUT" ./mame.arm sprinter \
# В macOS GNU timeout может отсутствовать; Python обеспечивает тот же лимит.
if command -v timeout >/dev/null 2>&1; then
set -- timeout "$TIMEOUT"
else
set -- python3 -c '
import subprocess, sys
try:
sys.exit(subprocess.run(sys.argv[2:], timeout=float(sys.argv[1])).returncode)
except subprocess.TimeoutExpired:
print("run_mame_hdd.sh: истёк лимит времени", file=sys.stderr)
sys.exit(124)
' "$TIMEOUT"
fi
exec "$@" ./mame.arm sprinter \
-skip_gameinfo -video opengl -window -nofilter \
-beta:wd179x:0 35hd -beta:wd179x:1 35hd \
-flop1 ./IMG/mc.img -flop2 ./IMG/dss171u.img \