From 90e222f9b2361b62615e1a37ec5be6c0b9838ba7 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sun, 7 Jan 2024 15:50:34 -0500 Subject: [PATCH] PPSSPP: switch to SDL which has native wayland support (and vulkan on some systems) --- apps/PPSSPP (PSP emulator)/description | 4 ++-- apps/PPSSPP (PSP emulator)/install | 19 +++++++++++++------ apps/PPSSPP (PSP emulator)/uninstall | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/apps/PPSSPP (PSP emulator)/description b/apps/PPSSPP (PSP emulator)/description index 126fd4c9687..84117651a4a 100644 --- a/apps/PPSSPP (PSP emulator)/description +++ b/apps/PPSSPP (PSP emulator)/description @@ -1,4 +1,4 @@ A PSP emulator that can run PSP games in full HD and can upscale textures also. -To run: Menu > Games > PPSSPPQt -To run in a terminal: PPSSPPQt +To run: Menu > Games > PPSSPPSDL +To run in a terminal: PPSSPPSDL diff --git a/apps/PPSSPP (PSP emulator)/install b/apps/PPSSPP (PSP emulator)/install index 937bfcba3b8..aa343dd4dfa 100755 --- a/apps/PPSSPP (PSP emulator)/install +++ b/apps/PPSSPP (PSP emulator)/install @@ -14,16 +14,23 @@ git clone https://github.com/hrydgard/ppsspp.git --recurse-submodules --shallow- cd ppsspp || error "Could not move to ppsspp folder" mkdir build || error "Could not make build folder" cd build || error "Could not move to build folder" -# vulkan does not currently work properly (or at all) in SDL or QT backends on Linux https://github.com/hrydgard/ppsspp/pull/13054 https://github.com/hrydgard/ppsspp/issues/11628 +# vulkan does not work for some systems in SDL backend on Linux https://github.com/hrydgard/ppsspp/pull/13054 +# vulkan does not work at all in QT backend on Linux https://github.com/hrydgard/ppsspp/issues/11628 +# QT backend does not work with wayland https://github.com/hrydgard/ppsspp/issues/16254 +# GL cannot be used on QT backend on ARM32 due to QT5 being built with GLES and not GL on ARM32 +# SDL is not guaranteed to have Wayland support builtin, so check for the headers before enabling it # changing to vulkan in the UI does nothing and OpenGL continues to be used # enabling it causes no compilation issues and it can not be fully disabled (always shows in the UI) so keep it enabled # disable system FFMPEG as recommended by upstream (can be incompatible with some custom HW decoders and newew FFMPEG versions) # bundled FFMPEG requires minimum GLIBC 2.28 and is available for armv7l and armv8 -# use GLES on ARM32 due to QT5 being built with GLES and not GL on ARM32 -if [ $arch == 32 ];then - cmake .. -DUSING_QT_UI=ON -DUSE_SYSTEM_FFMPEG=OFF -DUSING_GLES2=ON -DUSING_EGL=ON || error "cmake failed to configure the build" -elif [ $arch == 64 ];then - cmake .. -DUSING_QT_UI=ON -DUSE_SYSTEM_FFMPEG=OFF || error "cmake failed to configure the build" +if [ $arch == 32 ] && grep -q '\-lwayland' /usr/lib/arm-linux-gnueabihf/pkgconfig/sdl2.pc ;then + cmake .. -DUSING_QT_UI=OFF -DUSE_SYSTEM_FFMPEG=OFF -DUSING_GLES2=ON -DUSING_EGL=ON -DUSE_WAYLAND_WSI=ON || error "cmake failed to configure the build" +elif [ $arch == 32 ];then + cmake .. -DUSING_QT_UI=OFF -DUSE_SYSTEM_FFMPEG=OFF -DUSING_GLES2=ON -DUSING_EGL=ON || error "cmake failed to configure the build" +elif [ $arch == 64 ] && grep -q '\-lwayland' /usr/lib/aarch64-linux-gnu/pkgconfig/sdl2.pc ;then + cmake .. -DUSING_QT_UI=OFF -DUSE_SYSTEM_FFMPEG=OFF -DUSE_WAYLAND_WSI=ON || error "cmake failed to configure the build" +elif [ $arch == 64 ]; then + cmake .. -DUSING_QT_UI=OFF -DUSE_SYSTEM_FFMPEG=OFF -DUSE_WAYLAND_WSI=OFF || error "cmake failed to configure the build" else error "Failed to detect OS CPU architecture! Something is very wrong." fi diff --git a/apps/PPSSPP (PSP emulator)/uninstall b/apps/PPSSPP (PSP emulator)/uninstall index fa0d032ef57..c02610ff5d3 100755 --- a/apps/PPSSPP (PSP emulator)/uninstall +++ b/apps/PPSSPP (PSP emulator)/uninstall @@ -5,4 +5,4 @@ purge_packages || exit 1 # remove deprecated files rm -f ~/.local/share/applications/ppsspp.desktop ~/ppsspp -sudo rm -rf /usr/local/share/icons/hicolor/*/apps/ppsspp* /usr/local/share/mime/packages/ppsspp.xml /usr/local/share/applications/PPSSPPQt.desktop /usr/local/share/ppsspp /usr/local/bin/PPSSPPQt +sudo rm -rf /usr/local/share/icons/hicolor/*/apps/ppsspp* /usr/local/share/mime/packages/ppsspp.xml /usr/local/share/applications/PPSSPPQt.desktop /usr/local/share/applications/PPSSPPSDL.desktop /usr/local/share/ppsspp /usr/local/bin/PPSSPPQt /usr/local/bin/PPSSPPSDL