diff --git a/projects/ArchR/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh b/projects/ArchR/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh index ae083161d9..67f77c2481 100644 --- a/projects/ArchR/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh +++ b/projects/ArchR/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh @@ -164,15 +164,15 @@ else ROM="${1}" fi -# QT platform - default to xcb -export QT_QPA_PLATFORM=xcb +# QT platform - use wayland on Wayland compositors, xcb otherwise +if [ -n "${WAYLAND_DISPLAY}" ]; then + export QT_QPA_PLATFORM=wayland +else + export QT_QPA_PLATFORM=xcb +fi -# QT platform - some device / driver combinations need wayland -case ${HW_DEVICE} in - RK3566|RK3588|S922X) - [[ $(/usr/bin/gpudriver) == "libmali" ]] && export QT_QPA_PLATFORM=wayland - ;; -esac +# Qt requires UTF-8 locale +export LC_ALL=en_US.UTF-8 2>/dev/null || export LC_ALL=C.UTF-8 @PANFROST@ @HOTKEY@ diff --git a/projects/ArchR/packages/virtual/emulators/sources/Start MelonDS.sh b/projects/ArchR/packages/virtual/emulators/sources/Start MelonDS.sh index 0acd43ac15..386d77a892 100644 --- a/projects/ArchR/packages/virtual/emulators/sources/Start MelonDS.sh +++ b/projects/ArchR/packages/virtual/emulators/sources/Start MelonDS.sh @@ -10,14 +10,11 @@ set_kill set "-9 melonDS" sway_fullscreen "net.kuribo64.melonDS" & -# QT platform - default to xcb -export QT_QPA_PLATFORM=xcb - -# QT platform - some device / driver combinations need wayland -case ${HW_DEVICE} in - RK3566|RK3588|S922X) - [[ $(/usr/bin/gpudriver) == "libmali" ]] && export QT_QPA_PLATFORM=wayland - ;; -esac +# QT platform - use wayland on Wayland compositors, xcb otherwise +if [ -n "${WAYLAND_DISPLAY}" ]; then + export QT_QPA_PLATFORM=wayland +else + export QT_QPA_PLATFORM=xcb +fi /usr/bin/melonDS