mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2024-06-16 03:17:45 -04:00
Merge pull request #3121 from cmitu/drastic-pi4
drastic: workaround faulty input handling in a KMS context
This commit is contained in:
commit
91e6997203
|
@ -17,7 +17,12 @@ rp_module_section="exp"
|
|||
rp_module_flags="!all arm !armv6 !mali"
|
||||
|
||||
function depends_drastic() {
|
||||
getDepends libasound2-dev libsdl2-dev zlib1g-dev
|
||||
local depends=(libasound2-dev libsdl2-dev zlib1g-dev)
|
||||
if isPlatform "kms" && ! isPlatform "x11"; then
|
||||
depends+=(matchbox-window-manager xorg xserver-xorg-input-all)
|
||||
fi
|
||||
|
||||
getDepends ${depends[@]}
|
||||
}
|
||||
|
||||
function __binary_url_drastic() {
|
||||
|
@ -42,6 +47,27 @@ function configure_drastic() {
|
|||
ln -sfv "$md_inst/$file" "$md_conf_root/nds/drastic/$file"
|
||||
done
|
||||
|
||||
addEmulator 1 "$md_id" "nds" "pushd $md_conf_root/nds/drastic; $md_inst/drastic %ROM%; popd"
|
||||
if [[ "$md_mode" == "install" ]]; then
|
||||
cat > "$md_inst/drastic.sh" << _EOF_
|
||||
#!/bin/bash
|
||||
# Don't start a window manager on x11 platforms
|
||||
if [[ -n \$DISPLAY && "\$2" == "kms" ]]; then
|
||||
matchbox-window-manager &
|
||||
sleep 0.5
|
||||
fi
|
||||
pushd "$md_conf_root/nds/drastic"
|
||||
$md_inst/drastic "\$1"
|
||||
popd
|
||||
_EOF_
|
||||
chmod +x "$md_inst/drastic.sh"
|
||||
fi
|
||||
|
||||
# Launch DraStic in an x11 session for KMS platforms
|
||||
if isPlatform "kms" && ! isPlatform "x11"; then
|
||||
addEmulator 1 "$md_id" "nds" "XINIT:$md_inst/drastic.sh %ROM% kms"
|
||||
else
|
||||
addEmulator 1 "$md_id" "nds" "$md_inst/drastic.sh %ROM%"
|
||||
fi
|
||||
|
||||
addSystem "nds"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue