Skip to content

Commit

Permalink
Merge pull request #192 from kloptops/main
Browse files Browse the repository at this point in the history
Forgot to add mod_REGLinux and libgl_REGLinux.txt for quirks.
  • Loading branch information
kloptops authored Nov 23, 2024
2 parents 85f35c4 + 1f0dd15 commit 1f89d9b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
30 changes: 30 additions & 0 deletions PortMaster/libgl_REGLinux.txt
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions PortMaster/mod_REGLinux.txt
Original file line number Diff line number Diff line change
@@ -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 ""
}

0 comments on commit 1f89d9b

Please sign in to comment.