aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/main.cpp
diff options
context:
space:
mode:
authorKaydax <kaydax@kaydax.xyz>2026-05-18 19:07:41 +0200
committercrueter <crueter@eden-emu.dev>2026-05-18 19:07:41 +0200
commitad2e1cc554ecd363ae1412b66d537464bba001e7 (patch)
tree74550cbc893f7cbd6c3da3b24b4e91f27bee308e /src/input_common/main.cpp
parent02521882e788223f357af8e777eb322735afbf1d (diff)
[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>
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r--src/input_common/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp
index b04a70590a..5f0a8af3aa 100644
--- a/src/input_common/main.cpp
+++ b/src/input_common/main.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
@@ -25,7 +25,7 @@
#ifdef ENABLE_LIBUSB
#include "input_common/drivers/gc_adapter.h"
#endif
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
#include "input_common/drivers/joycon.h"
#include "input_common/drivers/sdl_driver.h"
#endif
@@ -90,7 +90,7 @@ struct InputSubsystem::Impl {
#endif
RegisterEngine("virtual_amiibo", virtual_amiibo);
RegisterEngine("virtual_gamepad", virtual_gamepad);
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
RegisterEngine("sdl", sdl);
RegisterEngine("joycon", joycon);
#endif
@@ -124,7 +124,7 @@ struct InputSubsystem::Impl {
#endif
UnregisterEngine(virtual_amiibo);
UnregisterEngine(virtual_gamepad);
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
UnregisterEngine(sdl);
UnregisterEngine(joycon);
#endif
@@ -154,7 +154,7 @@ struct InputSubsystem::Impl {
#endif
auto udp_devices = udp_client->GetInputDevices();
devices.insert(devices.end(), udp_devices.begin(), udp_devices.end());
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
auto joycon_devices = joycon->GetInputDevices();
devices.insert(devices.end(), joycon_devices.begin(), joycon_devices.end());
auto sdl_devices = sdl->GetInputDevices();
@@ -189,7 +189,7 @@ struct InputSubsystem::Impl {
if (engine == udp_client->GetEngineName()) {
return udp_client;
}
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
if (engine == sdl->GetEngineName()) {
return sdl;
}
@@ -280,7 +280,7 @@ struct InputSubsystem::Impl {
if (engine == virtual_gamepad->GetEngineName()) {
return true;
}
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
if (engine == sdl->GetEngineName()) {
return true;
}
@@ -301,7 +301,7 @@ struct InputSubsystem::Impl {
gcadapter->BeginConfiguration();
#endif
udp_client->BeginConfiguration();
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
sdl->BeginConfiguration();
joycon->BeginConfiguration();
#endif
@@ -317,7 +317,7 @@ struct InputSubsystem::Impl {
gcadapter->EndConfiguration();
#endif
udp_client->EndConfiguration();
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
sdl->EndConfiguration();
joycon->EndConfiguration();
#endif
@@ -325,7 +325,7 @@ struct InputSubsystem::Impl {
void PumpEvents() const {
update_engine->PumpEvents();
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
sdl->PumpEvents();
#endif
}
@@ -350,7 +350,7 @@ struct InputSubsystem::Impl {
std::shared_ptr<GCAdapter> gcadapter;
#endif
-#ifdef HAVE_SDL2
+#ifdef HAVE_SDL3
std::shared_ptr<SDLDriver> sdl;
std::shared_ptr<Joycons> joycon;
#endif