@@ -16,8 +16,16 @@ rp_module_licence="GPL3 https://raw.githubusercontent.com/PCSX2/pcsx2/master/COP
16
16
rp_module_section=" exp"
17
17
rp_module_flags=" !all x86"
18
18
19
+ function _64bit_available_pcsx2() {
20
+ # detect if a 64bit version for pcsx2 is available in the Ubuntu PPA
21
+ if [[ -n " ${__os_ubuntu_ver} " ]] && compareVersions " ${__os_ubuntu_ver} " ge 21.04; then
22
+ return 0
23
+ fi
24
+
25
+ return 1
26
+ }
19
27
function depends_pcsx2() {
20
- if isPlatform " 64bit" ; then
28
+ if isPlatform " 64bit" && ! _64bit_available_pcsx2 ; then
21
29
iniConfig " = " ' "' " $configdir /all/retropie.cfg"
22
30
iniGet " own_sdl2"
23
31
if [[ " $ini_value " != " 0" ]]; then
@@ -37,10 +45,12 @@ function depends_pcsx2() {
37
45
if [[ " $md_mode " == " install" ]]; then
38
46
# On Ubuntu, add the PCSX2 PPA to get the latest version
39
47
[[ -n " ${__os_ubuntu_ver} " ]] && add-apt-repository -y ppa:pcsx2-team/pcsx2-daily
40
- dpkg --add-architecture i386
48
+ if ! _64bit_available_pcsx2 ; then
49
+ dpkg --add-architecture i386
50
+ fi
41
51
else
42
52
rm -f /etc/apt/sources.list.d/pcsx2-team-ubuntu-pcsx2-daily-* .list
43
- apt-key del " D7B4 49CF E17E 659E 5A12 EE8E DD6E EEA2 BD74 7717" > /dev/null
53
+ apt-key del " D7B4 49CF E17E 659E 5A12 EE8E DD6E EEA2 BD74 7717" > /dev/null
44
54
fi
45
55
}
46
56
@@ -61,9 +71,15 @@ function remove_pcsx2() {
61
71
62
72
function configure_pcsx2() {
63
73
mkRomDir " ps2"
64
- # Windowed option
65
- addEmulator 0 " $md_id " " ps2" " /usr/games/pcsx2 %ROM% --windowed"
66
- # Fullscreen option with no gui (default, because we can close with `Esc` key, easy to map for gamepads)
67
- addEmulator 1 " $md_id -nogui" " ps2" " /usr/games/pcsx2 %ROM% --fullscreen --nogui"
74
+
75
+ # detect if the new (QT) UI is installed and add the fullscreen/windowed commands
76
+ if [[ -f /usr/bin/pcsx2-qt ]]; then
77
+ addEmulator 0 " $md_id " " ps2" " pcsx2-qt -nofullscreen %ROM%"
78
+ addEmulator 1 " $md_id -nogui" " ps2" " pcsx2-qt -fullscreen -nogui %ROM%"
79
+ else
80
+ addEmulator 0 " $md_id " " ps2" " /usr/games/pcsx2 --windowed %ROM%"
81
+ addEmulator 1 " $md_id -nogui" " ps2" " /usr/games/pcsx2 --fullscreen --nogui %ROM%"
82
+ fi
83
+
68
84
addSystem " ps2"
69
85
}
0 commit comments