From 444645852be513a4ce2cb44abf86186d71c8bb5c Mon Sep 17 00:00:00 2001 From: "Al. Lopez" <67606569+AL2009man@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:58:25 +0000 Subject: [PATCH 1/3] added Steam Hardware HIDs --- MarathonRecomp/hid/driver/sdl_hid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MarathonRecomp/hid/driver/sdl_hid.cpp b/MarathonRecomp/hid/driver/sdl_hid.cpp index 0721a799..42aa14dc 100644 --- a/MarathonRecomp/hid/driver/sdl_hid.cpp +++ b/MarathonRecomp/hid/driver/sdl_hid.cpp @@ -353,7 +353,8 @@ void hid::Init() SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1"); - SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAM, "1"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, "1"); SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1"); SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0"); // Uses Button Labels. This hint is disabled for Nintendo Controllers. From 10162b1b083a36205dabe670074877072e6febe6 Mon Sep 17 00:00:00 2001 From: "Al. Lopez" <67606569+AL2009man@users.noreply.github.com> Date: Fri, 1 Aug 2025 19:23:53 +0000 Subject: [PATCH 2/3] added SDL_GameControllerDB support this adds optional support for SDL_GameControllerDB, allowing to even more Game Controllers to be supported. Just drag-and-drop `gamecontrollerdb.txt` file on the sonic.ex-- I mean; the game's executable file. --- MarathonRecomp/hid/driver/sdl_hid.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MarathonRecomp/hid/driver/sdl_hid.cpp b/MarathonRecomp/hid/driver/sdl_hid.cpp index 42aa14dc..addfd851 100644 --- a/MarathonRecomp/hid/driver/sdl_hid.cpp +++ b/MarathonRecomp/hid/driver/sdl_hid.cpp @@ -363,6 +363,11 @@ void hid::Init() SDL_AddEventWatch(HID_OnSDLEvent, nullptr); SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER); + + // Load controller mappings from SDL_GameControllerDB + if (int mappings = SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); mappings > 0) { + LOGFN("Loaded {} controller mapping(s) from SDL_GameControllerDB ({})", mappings, "gamecontrollerdb.txt"); + } } uint32_t hid::GetState(uint32_t dwUserIndex, XAMINPUT_STATE* pState) From 547bde7fc88c2f8f938b9cb880081d93e80a7430 Mon Sep 17 00:00:00 2001 From: "Al. Lopez" <67606569+AL2009man@users.noreply.github.com> Date: Fri, 1 Aug 2025 15:34:05 -0400 Subject: [PATCH 3/3] restored Wii HIDAPI Accidentally remove Wii HIDAPI during the copy-pasting process. --- MarathonRecomp/hid/driver/sdl_hid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/MarathonRecomp/hid/driver/sdl_hid.cpp b/MarathonRecomp/hid/driver/sdl_hid.cpp index addfd851..2e6b5521 100644 --- a/MarathonRecomp/hid/driver/sdl_hid.cpp +++ b/MarathonRecomp/hid/driver/sdl_hid.cpp @@ -353,6 +353,7 @@ void hid::Init() SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAM, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, "1"); SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1");