From 1f0dd15846175c55123cda448b5e328e4b4786f2 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 23 Nov 2024 21:13:23 +0800 Subject: [PATCH] Forgot to add mod_REGLinux and libgl_REGLinux.txt for quirks. --- PortMaster/libgl_REGLinux.txt | 30 ++++++++++++++++++++++++++++++ PortMaster/mod_REGLinux.txt | 25 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 PortMaster/libgl_REGLinux.txt create mode 100644 PortMaster/mod_REGLinux.txt diff --git a/PortMaster/libgl_REGLinux.txt b/PortMaster/libgl_REGLinux.txt new file mode 100644 index 0000000..02c0397 --- /dev/null +++ b/PortMaster/libgl_REGLinux.txt @@ -0,0 +1,30 @@ +#!/bin/bash +# NOTE: This script uses $PWD to setup the GL4ES directory! +# Before calling this, ensure you are on the port root directory, e.g.: +# > gamedir="/$directory/ports/stardewvalley" +# > cd "$gamedir/" + +if ! glxinfo | grep "OpenGL version string"; then + export LIBGL_ES=2 + export LIBGL_GL=21 + export LIBGL_FB=4 + + # If the dri device does not exist, then let's not use + # the gbm backend. + if [ ! -e "/dev/dri/card0" ]; then + export LIBGL_FB=2 + fi + + if [ -d "$PWD/gl4es.$DEVICE_ARCH" ]; then + export LD_LIBRARY_PATH="$PWD/gl4es.$DEVICE_ARCH:$LD_LIBRARY_PATH" + elif [ -d "$PWD/gl4es" ]; then + export LD_LIBRARY_PATH="$PWD/gl4es:$LD_LIBRARY_PATH" + fi +fi + +# This sets up the standard libs directory. +if [ -d "$PWD/libs.$DEVICE_ARCH" ]; then + export LD_LIBRARY_PATH="$PWD/libs.$DEVICE_ARCH:$LD_LIBRARY_PATH" +elif [ -d "$PWD/libs" ]; then + export LD_LIBRARY_PATH="$PWD/libs:$LD_LIBRARY_PATH" +fi diff --git a/PortMaster/mod_REGLinux.txt b/PortMaster/mod_REGLinux.txt new file mode 100644 index 0000000..80a0210 --- /dev/null +++ b/PortMaster/mod_REGLinux.txt @@ -0,0 +1,25 @@ +#!/bin/bash + +## Modular - Batocera +# +# A modular file that is sourced for specific script lines required by ports running on Batocera. +# +# usage `[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"` + +PORT_32BIT="${PORT_32BIT:-"N"}" + +if [[ "$PORT_32BIT" == "Y" ]]; then + export SPA_PLUGIN_DIR="/usr/lib32/spa-0.2" + export PIPEWIRE_MODULE_DIR="/usr/lib32/pipewire-0.3/" +fi + +# Use for Godot 2 +GODOT2_OPTS="-r ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f" + +# Use for Godot 3+ +GODOT_OPTS="--resolution ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f" + +pm_platform_helper() { + # DO SOMETHING HERE + printf "" +}