Skip to content

Commit 9f6e198

Browse files
committed
sdl12-compat: enable on a few SDL1 modules
Enable the 'sdl12-compat' backend for: * Atari800 * Fuse * Osmose * Linapple2 (Linapple-Pie). Upstream seems to be still using SDL1. * OpenBOR * FBZX * XRick * CapriceRPI
1 parent ac5ec0e commit 9f6e198

File tree

8 files changed

+25
-8
lines changed

8 files changed

+25
-8
lines changed

scriptmodules/emulators/atari800.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .a52 .bas .bin .car .xex .atr .xfd .dcm .atr.gz
1515
rp_module_licence="GPL2 https://raw.githubusercontent.com/atari800/atari800/master/COPYING"
1616
rp_module_repo="git https://github.com/atari800/atari800.git ATARI800_5_2_0"
1717
rp_module_section="opt"
18-
rp_module_flags="sdl1 !mali"
18+
rp_module_flags="sdl1"
1919

2020
function depends_atari800() {
2121
local depends=(libsdl1.2-dev autoconf automake zlib1g-dev libpng-dev)
@@ -94,6 +94,9 @@ function configure_atari800() {
9494
# if we are on fkms, use the sdl1 dispmanx backend by default for good performance without using X11/opengl
9595
isPlatform kms && isPlatform "dispmanx" && _backend_set_atari800 "dispmanx"
9696

97+
# when no dispmanx is available, but still on KMS, use 'sdl12-compat' and go through SDL2
98+
isPlatform "kms" && ! isPlatform "dispmanx" _&& _backend_set_atari800 "sdl12-compat"
99+
97100
# this is split out so we can call it via _backend_set_atari800
98101
_add_emulators_atari800
99102
addSystem "atari800"

scriptmodules/emulators/capricerpi.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .cdt .cpc .dsk\n\nCopy your Amstrad CPC games to
1515
rp_module_licence="GPL2 https://raw.githubusercontent.com/KaosOverride/CapriceRPI/master/COPYING.txt"
1616
rp_module_repo="git https://github.com/KaosOverride/CapriceRPI.git master"
1717
rp_module_section="opt"
18-
rp_module_flags="sdl1 !all videocore"
18+
rp_module_flags="sdl1"
1919

2020
function depends_capricerpi() {
2121
getDepends libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev zlib1g-dev libpng-dev
@@ -44,4 +44,8 @@ function configure_capricerpi() {
4444

4545
addEmulator 0 "$md_id" "amstradcpc" "$md_inst/capriceRPI %ROM%"
4646
addSystem "amstradcpc"
47+
48+
[[ $mode == "remove" ]] && return
49+
# use sdl12-compat backend on KMS
50+
! isPlatform "dispmanx" && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
4751
}

scriptmodules/emulators/fbzx.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .sna .szx .z80 .tap .tzx .gz .udi .mgt .img .trd
1515
rp_module_licence="GPL3 https://raw.githubusercontent.com/rastersoft/fbzx/master/COPYING"
1616
rp_module_repo="git https://github.com/rastersoft/fbzx :_get_branch_fbzx"
1717
rp_module_section="opt"
18-
rp_module_flags="sdl1 !mali !kms"
18+
rp_module_flags="sdl1"
1919

2020
function _get_branch_fbzx() {
2121
local branch
@@ -55,4 +55,6 @@ function configure_fbzx() {
5555

5656
addEmulator 0 "$md_id" "zxspectrum" "pushd $md_inst/share; $md_inst/bin/fbzx -fs %ROM%; popd"
5757
addSystem "zxspectrum"
58+
59+
! isPlatform "dispmanx" && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
5860
}

scriptmodules/emulators/fuse.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ function configure_fuse() {
6363
# default to dispmanx backend
6464
isPlatform "dispmanx" && _backend_set_fuse "dispmanx"
6565

66+
# without dispmanx, but with KMS, then use sdl12-compat
67+
! isPlatform "dispmanx" && isPlatform "kms" && _backend_set_fuse "sdl12-compat"
68+
6669
local script="$romdir/zxspectrum/+Start Fuse.sh"
6770
cat > "$script" << _EOF_
6871
#!/bin/bash

scriptmodules/emulators/linapple.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function configure_linapple() {
6060
done
6161

6262
isPlatform "dispmanx" && setBackend "$md_id" "dispmanx"
63+
! isPlatform "dispmanx" && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
6364

6465
mkUserDir "$md_conf_root/apple2"
6566
moveConfigDir "$home/.linapple" "$md_conf_root/apple2"

scriptmodules/emulators/osmose.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .bin .gg .sms .zip\nCopy your Game Gear roms to
1515
rp_module_licence="GPL2 https://raw.githubusercontent.com/RetroPie/osmose-rpi/master/license.txt"
1616
rp_module_repo="git https://github.com/RetroPie/osmose-rpi.git master"
1717
rp_module_section="opt"
18-
rp_module_flags="!mali !kms"
18+
rp_module_flags="!mali sdl1"
1919

2020
function depends_osmose() {
2121
getDepends libsdl1.2-dev
@@ -48,4 +48,6 @@ function configure_osmose() {
4848
addEmulator 0 "$md_id" "mastersystem" "$md_inst/osmose %ROM% -tv -fs"
4949
addSystem "gamegear"
5050
addSystem "mastersystem"
51+
52+
[[ $mode == "configure" ]] && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
5153
}

scriptmodules/ports/openbor.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function configure_openbor() {
4848

4949
mkRomDir "ports/$md_id"
5050
isPlatform "dispmanx" && setBackend "$md_id" "dispmanx"
51+
! isPlatform "dispmanx" && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
5152

5253
cat >"$md_inst/openbor.sh" << _EOF_
5354
#!/bin/bash

scriptmodules/ports/xrick.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rp_module_help="Install the xrick data.zip to $romdir/ports/xrick/data.zip"
1515
rp_module_licence="GPL https://raw.githubusercontent.com/RetroPie/xrick/master/README"
1616
rp_module_repo="git https://github.com/RetroPie/xrick.git master"
1717
rp_module_section="opt"
18-
rp_module_flags="sdl1 !mali"
18+
rp_module_flags="sdl1"
1919

2020
function depends_xrick() {
2121
getDepends libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev zlib1g
@@ -43,14 +43,15 @@ function configure_xrick() {
4343

4444
[[ "$md_mode" == "remove" ]] && return
4545

46+
ln -sf "$romdir/ports/xrick/data.zip" "$md_inst/data.zip"
4647
# set dispmanx by default on rpi with fkms
4748
isPlatform "dispmanx" && ! isPlatform "videocore" && setBackend "$md_id" "dispmanx"
48-
49-
ln -sf "$romdir/ports/xrick/data.zip" "$md_inst/data.zip"
49+
# on KMS and without dispmanx, use sdl12-compat
50+
! isPlatform "dispmanx" && isPlatform "kms" && setBackend "$md_id" "sdl12-compat"
5051

5152
local file="$md_inst/xrick.sh"
5253
cat >"$file" << _EOF_
53-
#!/bin/bash
54+
#!/usr/bin/env bash
5455
pushd "$md_inst"
5556
./xrick "\$@"
5657
popd

0 commit comments

Comments
 (0)