Volkov: адаптировать тайминги MAME 0.287 и таймаут на macOS
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user