File tree Expand file tree Collapse file tree 4 files changed +64
-2
lines changed
scriptmodules/supplementary Expand file tree Collapse file tree 4 files changed +64
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ function _list_backends() {
18
18
local id=" $1 "
19
19
backends=()
20
20
21
+ # skip the 'depends' packages
22
+ [[ ${__mod_info[$id/section]} == " depends" ]] && return 1
23
+
21
24
local flags=" ${__mod_info[$id/flags]} "
22
25
local sdl
23
26
if isPlatform " videocore" && hasFlag " $flags " " sdl1-videocore" ; then
@@ -35,6 +38,7 @@ function _list_backends() {
35
38
if [[ " $sdl " == " sdl1" ]]; then
36
39
backends[" default" ]=" SDL1 Framebuffer driver"
37
40
isPlatform " dispmanx" && backends[" dispmanx" ]=" SDL1 DispmanX driver"
41
+ isPlatform " kms" && ! isPlatform " dispmanx" && backends[" sdl12-compat" ]=" SDL1 Compat driver"
38
42
elif [[ " $sdl " == " sdl2" ]]; then
39
43
if isPlatform " videocore" ; then
40
44
default=" SDL2 videocore driver"
@@ -109,6 +113,9 @@ function gui_configure_backends() {
109
113
continue
110
114
fi
111
115
fi
116
+ if [[ " $choice " == " sdl12-compat" ]] && ! rp_isInstalled " sdl12-compat" ; then
117
+ rp_callModule " sdl12-compat" _auto_
118
+ fi
112
119
local func=" _backend_set_$id "
113
120
if fnExists " $func " ; then
114
121
rp_callModule " $id " _backend_set " $choice " 1
Original file line number Diff line number Diff line change @@ -1062,6 +1062,9 @@ function config_backend() {
1062
1062
fi
1063
1063
COMMAND="SDL1_VIDEODRIVER=dispmanx $COMMAND"
1064
1064
;;
1065
+ sdl12-compat)
1066
+ COMMAND="LD_PRELOAD=\"$ROOTDIR/supplementary/sdl12-compat/libSDL-1.2.so.0\" $COMMAND"
1067
+ ;;
1065
1068
x11)
1066
1069
XINIT=1
1067
1070
XINIT_WM=1
Original file line number Diff line number Diff line change 11
11
12
12
rp_module_id=" sdl1"
13
13
rp_module_desc=" SDL 1.2.15 with rpi fixes and dispmanx"
14
- rp_module_licence=" GPL2 https://hg.libsdl. org/SDL/raw-file/7676476631ce /COPYING"
14
+ rp_module_licence=" GPL2 https://raw.githubusercontent.com/libsdl- org/SDL-1.2/main /COPYING"
15
15
rp_module_section=" depends"
16
- rp_module_flags=" !all rpi"
16
+ rp_module_flags=" !all rpi dispmanx "
17
17
18
18
function get_pkg_ver_sdl1() {
19
19
local basever
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # This file is part of The RetroPie Project
4
+ #
5
+ # The RetroPie Project is the legal property of its developers, whose names are
6
+ # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
7
+ #
8
+ # See the LICENSE.md file at the top-level directory of this distribution and
9
+ # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
10
+ #
11
+
12
+ rp_module_id=" sdl12-compat"
13
+ rp_module_desc=" SDL1.2 compatibility layer that uses SDL2 under the hood"
14
+ rp_module_help=" Provides a binary and source compatible API for programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes"
15
+ rp_module_licence=" ZLIB https://raw.githubusercontent.com/libsdl-org/sdl12-compat/main/LICENSE.txt"
16
+ rp_module_repo=" git https://github.com/libsdl-org/sdl12-compat :_version_sdl12-compat"
17
+ rp_module_section=" depends"
18
+ rp_module_flags=" !x11"
19
+
20
+ function _version_sdl12-compat() {
21
+ local ver=" 1.2.68"
22
+ if [[ " $1 " == " short" ]]; then
23
+ echo $ver
24
+ else
25
+ echo " release-$ver "
26
+ fi
27
+ }
28
+ function depend_sdl12-compat() {
29
+ getDepends libsdl2-dev cmake
30
+ }
31
+
32
+ function sources_sdl12-compat() {
33
+ gitPullOrClone
34
+ }
35
+
36
+ function build_sdl12-compat() {
37
+ cmake -DSDL12TESTS=OFF -DSDL12DEVEL=OFF .
38
+ make
39
+ md_ret_require=" $md_build /libSDL-1.2.so.$( _version_sdl12-compat short) "
40
+ }
41
+
42
+ function install_sdl12-compat() {
43
+ md_ret_files=(
44
+ libSDL-1.2.so." $( _version_sdl12-compat short) "
45
+ README.md
46
+ LICENSE.txt
47
+ )
48
+ }
49
+
50
+ function configure_sdl12-compat() {
51
+ ldconfig -nN " $md_inst "
52
+ }
You can’t perform that action at this time.
0 commit comments