#!/usr/bin/env bash set -euo pipefail LOGFILE="$HOME/.local/logs/rpcs3.log" log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; } RPCS_BIN="$(command -v rpcs3 || true)" if [ -z "$RPCS_BIN" ]; then log "ERROR: rpcs3 not found in PATH" exit 127 fi log "Launching RPCS3: $RPCS_BIN \"${@}\"" "$RPCS_BIN" --no-gui --fullscreen "${@}" >>"$LOGFILE"