mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-20 03:17:02 +02:00
[externals] Update to SDL3 (#3952)
Since the launch of the steam controller I think it's only best to push towards updating to SDL3 allowing for a wider range of controller support I went ahead and started on getting it working. Everything here should be functional, I've personally tested it all on Arch Linux. Still untested on windows, so looking for feedback on that Any feedback and help would be appreciated! Main changes: - Bump everything to SDL3 - Handle SDL3 audio and input - Add steam controller support, including HD Rumble - Improved battery reporting via the status icon by using real % rather than state alone Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3952 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
02521882e7
commit
ad2e1cc554
34 changed files with 768 additions and 537 deletions
28
externals/CMakeLists.txt
vendored
28
externals/CMakeLists.txt
vendored
|
|
@ -136,8 +136,7 @@ if(ENABLE_CUBEB)
|
|||
endif()
|
||||
|
||||
if (NOT ANDROID)
|
||||
if (YUZU_USE_EXTERNAL_SDL2)
|
||||
message(STATUS "Using SDL2 from externals.")
|
||||
if (YUZU_USE_BUNDLED_SDL3)
|
||||
if (NOT WIN32)
|
||||
# Yuzu itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers
|
||||
# Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095)
|
||||
|
|
@ -158,21 +157,26 @@ if (NOT ANDROID)
|
|||
set(SDL_FILE ON)
|
||||
endif()
|
||||
|
||||
if ("${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck")
|
||||
set(SDL_PIPEWIRE OFF) # build errors out with this on
|
||||
AddJsonPackage("sdl2_steamdeck")
|
||||
else()
|
||||
AddJsonPackage("sdl2_generic")
|
||||
endif()
|
||||
elseif (YUZU_USE_BUNDLED_SDL2)
|
||||
message(STATUS "Using bundled SDL2")
|
||||
AddJsonPackage(sdl3)
|
||||
else()
|
||||
message(STATUS "Using bundled SDL3")
|
||||
if (PLATFORM_FREEBSD)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
AddJsonPackage(sdl2)
|
||||
AddJsonPackage(sdl3-ci)
|
||||
endif()
|
||||
|
||||
find_package(SDL2 2.26.4 REQUIRED)
|
||||
# Normalize SDL3 link target across package variants.
|
||||
# Some SDL3 packages export only SDL3::SDL3-shared or SDL3::SDL3-static.
|
||||
if (NOT TARGET SDL3::SDL3)
|
||||
if (TARGET SDL3::SDL3-shared)
|
||||
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-shared)
|
||||
elseif (TARGET SDL3::SDL3-static)
|
||||
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
|
||||
else()
|
||||
message(FATAL_ERROR "SDL3 package found, but no usable SDL3 target was exported")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
|
|
|||
31
externals/cpmfile.json
vendored
31
externals/cpmfile.json
vendored
|
|
@ -122,13 +122,13 @@
|
|||
"BUNDLE_SPEEX ON"
|
||||
]
|
||||
},
|
||||
"sdl2": {
|
||||
"sdl3-ci": {
|
||||
"ci": true,
|
||||
"package": "SDL2",
|
||||
"name": "SDL2",
|
||||
"repo": "crueter-ci/SDL2",
|
||||
"version": "2.32.10-3c28e8ecc0",
|
||||
"min_version": "2.26.4"
|
||||
"package": "SDL3",
|
||||
"name": "SDL3",
|
||||
"repo": "crueter-ci/SDL3",
|
||||
"version": "3.4.8-d57c3b685c",
|
||||
"min_version": "3.2.10"
|
||||
},
|
||||
"catch2": {
|
||||
"package": "Catch2",
|
||||
|
|
@ -156,22 +156,13 @@
|
|||
"find_args": "MODULE",
|
||||
"git_version": "4.25"
|
||||
},
|
||||
"sdl2_generic": {
|
||||
"package": "SDL2",
|
||||
"sdl3": {
|
||||
"package": "SDL3",
|
||||
"repo": "libsdl-org/SDL",
|
||||
"tag": "release-%VERSION%",
|
||||
"hash": "d5622d6bb7266f7942a7b8ad43e8a22524893bf0c2ea1af91204838d9b78d32768843f6faa248757427b8404b8c6443776d4afa6b672cd8571a4e0c03a829383",
|
||||
"bundled": true,
|
||||
"git_version": "2.32.10",
|
||||
"skip_updates": true
|
||||
},
|
||||
"sdl2_steamdeck": {
|
||||
"package": "SDL2",
|
||||
"repo": "libsdl-org/SDL",
|
||||
"sha": "cc016b0046",
|
||||
"hash": "b8d9873446cdb922387471df9968e078714683046674ef0d0edddf8e25da65a539a3bae83d635496b970237f90b07b36a69f8d7855d450de59311d6d6e8c3dbc",
|
||||
"bundled": true,
|
||||
"skip_updates": "true"
|
||||
"hash": "df5a323af7ac366661a3c0e887969c72584d232f3cc211419d59b0487b620b6b2859d4549c9e8df002ee489290062e466fcfddf7edc0872a37b1f2845e81c0f3",
|
||||
"git_version": "3.4.8",
|
||||
"version": "3.2.10"
|
||||
},
|
||||
"moltenvk": {
|
||||
"repo": "V380-Ori/Ryujinx.MoltenVK",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue