@@ -13,7 +13,7 @@ rp_module_id="splashscreen"
13
13
rp_module_desc=" Configure Splashscreen"
14
14
rp_module_section=" main"
15
15
rp_module_repo=" git https://github.com/RetroPie/retropie-splashscreens.git master"
16
- rp_module_flags=" noinstclean !all rpi !osmc !xbian !aarch64 "
16
+ rp_module_flags=" noinstclean !all rpi !osmc !xbian"
17
17
18
18
function _update_hook_splashscreen() {
19
19
# make sure splashscreen is always up to date if updating just RetroPie-Setup
@@ -32,9 +32,14 @@ function _video_exts_splashscreen() {
32
32
}
33
33
34
34
function depends_splashscreen() {
35
- local params=(insserv)
36
- isPlatform " 32bit" && params+=(omxplayer)
37
- getDepends " ${params[@]} "
35
+ # pin archive.raspberrypi.org version of VLC on buster as updated "security" vanilla version doesn't have mmal output
36
+ if [[ " $__os_debian_ver " -lt 11 ]]; then
37
+ cp " $md_data /rp-vlc" /etc/apt/preferences.d/
38
+ # try and install vlc to force downgrade
39
+ aptInstall --allow-downgrades vlc
40
+ else
41
+ getDepends vlc
42
+ fi
38
43
}
39
44
40
45
function install_bin_splashscreen() {
@@ -48,20 +53,28 @@ ConditionPathExists=$md_inst/asplashscreen.sh
48
53
49
54
[Service]
50
55
Type=oneshot
56
+ User=$__user
51
57
ExecStart=$md_inst /asplashscreen.sh
52
58
RemainAfterExit=yes
53
59
54
60
[Install]
55
61
WantedBy=sysinit.target
56
62
_EOF_
57
63
58
- rp_installModule " omxiv" " _autoupdate_"
59
-
60
64
gitPullOrClone " $md_inst "
61
65
62
66
cp " $md_data /asplashscreen.sh" " $md_inst "
63
67
64
68
iniConfig " =" ' "' " $md_inst /asplashscreen.sh"
69
+
70
+ if isPlatform " videocore" ; then
71
+ # set vlc mmal layer for videocore
72
+ iniSet " CMD_OPTS" " --mmal-layer 10001"
73
+ else
74
+ # install script to kill splashscreen before running autostart scripts when using kms
75
+ cp " $md_data /05-splash.sh" /etc/profile.d/
76
+ fi
77
+
65
78
iniSet " ROOTDIR" " $rootdir "
66
79
iniSet " DATADIR" " $datadir "
67
80
iniSet " REGEX_IMAGE" " $( _image_exts_splashscreen) "
@@ -107,9 +120,6 @@ function disable_splashscreen() {
107
120
function configure_splashscreen() {
108
121
[[ " $md_mode " == " remove" ]] && return
109
122
110
- # remove legacy service
111
- [[ -f " /etc/init.d/asplashscreen" ]] && insserv -r asplashscreen && rm -f /etc/init.d/asplashscreen
112
-
113
123
disable_plymouth_splashscreen
114
124
enable_splashscreen
115
125
[[ ! -f /etc/splashscreen.list ]] && default_splashscreen
@@ -118,8 +128,9 @@ function configure_splashscreen() {
118
128
function remove_splashscreen() {
119
129
enable_plymouth_splashscreen
120
130
disable_splashscreen
121
- rp_callModule " omxiv" remove
122
131
rm -f /etc/splashscreen.list /etc/systemd/system/asplashscreen.service
132
+ rm -f /etc/apt/preferences.d/rp-vlc
133
+ rm -f /etc/profile.d/05-splash.sh
123
134
systemctl daemon-reload
124
135
}
125
136
@@ -229,7 +240,7 @@ function preview_splashscreen() {
229
240
230
241
local path
231
242
local file
232
- local omxiv= " /opt/retropie/supplementary/omxiv/omxiv "
243
+ local splash_cmd= " sudo -u $__user XDG_RUNTIME_DIR=/run/user/ $SUDO_UID vlc --intf dummy --quiet --play-and-exit --image-duration 6 "
233
244
while true ; do
234
245
local cmd=(dialog --backtitle " $__backtitle " --menu " Choose an option." 22 86 16)
235
246
local choice=$( " ${cmd[@]} " " ${options[@]} " 2>&1 > /dev/tty)
@@ -241,13 +252,13 @@ function preview_splashscreen() {
241
252
1)
242
253
file=$( choose_splashscreen " $path " " image" )
243
254
[[ -z " $file " ]] && break
244
- $omxiv -b " $file "
255
+ $splash_cmd " $file "
245
256
;;
246
257
2)
247
258
file=$( mktemp)
248
259
find " $path " -type f ! -regex " .*/\..*" ! -regex " .*LICENSE" ! -regex " .*README.*" ! -regex " .*\.sh" | sort > " $file "
249
260
if [[ -s " $file " ]]; then
250
- $omxiv -t 6 -T blend -b --once -f " $file "
261
+ tr " \n " " \0 " < " $file " | xargs -0 $splash_cmd
251
262
else
252
263
printMsgs " dialog" " There are no splashscreens installed in $path "
253
264
fi
@@ -257,7 +268,7 @@ function preview_splashscreen() {
257
268
3)
258
269
file=$( choose_splashscreen " $path " " video" )
259
270
[[ -z " $file " ]] && break
260
- omxplayer --no-osd -b --layer 10000 " $file "
271
+ $splash_cmd " $file "
261
272
;;
262
273
esac
263
274
done
0 commit comments