#!/usr/bin/sh

if [ -z $1 ]; then
    configURI=https://rs.config.runescape.com/k=5/l=\$\(Language:0\)/jav_config.ws
else
    configURI=$1
    shift
fi

export PULSE_PROP_OVERRIDE="application.name='RuneScape' application.icon_name='runescape' media.role='game'"
export SDL_VIDEO_X11_WMCLASS="RuneScape"
export PULSE_LATENCY_MSEC=200

# Some older graphics drivers may require this to be uncommented, but it will restrict the available graphics settings and performance.
#export MESA_GL_VERSION_OVERRIDE=3.0

unset XMODIFIERS
/usr/share/games/runescape-launcher/runescape --configURI $configURI $@
