#!/bin/sh # Headless Mesen2 test runner: re/mesen.sh [rom] # LD_PRELOAD works around the 2.1.1 build's static libstdc++ clashing with system libstdc++ (std::bad_cast at load). ROM="${2:-$(dirname "$0")/../rom/tbg_jp.sfc}" LD_PRELOAD=/usr/lib/libstdc++.so.6 DISPLAY="${DISPLAY:-:1}" \ XAUTHORITY="${XAUTHORITY:-$(ls /run/user/$(id -u)/xauth_* 2>/dev/null | head -1)}" \ exec "$HOME/.local/opt/mesen2/Mesen" --testrunner "$ROM" "$1"