#!/bin/sh
# PPSSPP on Sailfish OS. The accelerometer and the device orientation come
# from sensorfw inside ppsspp-bin (QtSensors); the former Python bridge that
# turned the sensor into a virtual joystick is no longer needed.

export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
export SDL_VIDEODRIVER=wayland
export PPSSPP_ASSET_DIR=/usr/share/ppsspp/assets
export LD_LIBRARY_PATH="/usr/lib64:/vendor/lib64:$LD_LIBRARY_PATH"

exec /usr/bin/ppsspp-bin "$@"
