Replies: 4 comments 8 replies
-
Can anyone help? |
Beta Was this translation helpful? Give feedback.
-
So more to this. I added some debugging when having both my PS5 and 8bitdo M30 (xbox mode) connected. I added some debugging code to the SDL2 gamepad module:
I've even added mapping for my 2 controllers into a custom db txt file:
Running
So SDL_NumJoysticks() is returning 0. I've also built against a custom build version of SDL2 ensuring that MFI is built in:
And tried the official downloaded framework for SDL2-2.30.10. Still no luck.... @rb6502 Sorry to bother but I see you wrote much of this SDL2 input code. Any idea? |
Beta Was this translation helpful? Give feedback.
-
OK definitely something wrong with something the way SDL2 is looking for gamecontroller. This test code doesn't work: #include <SDL.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
// Initialize SDL with joystick subsystem
if (SDL_Init(SDL_INIT_JOYSTICK) < 0) {
printf("SDL initialization failed: %s\n", SDL_GetError());
return 1;
}
SDL_JoystickEventState(SDL_ENABLE);
int num_joysticks = SDL_NumJoysticks();
printf("Number of joysticks detected: %d\n", num_joysticks);
for (int i = 0; i < num_joysticks; i++) {
SDL_Joystick* joystick = SDL_JoystickOpen(i);
if (joystick) {
printf("\nJoystick %d:\n", i);
printf("Name: %s\n", SDL_JoystickName(joystick));
printf("Number of axes: %d\n", SDL_JoystickNumAxes(joystick));
printf("Number of buttons: %d\n", SDL_JoystickNumButtons(joystick));
printf("Number of hats: %d\n", SDL_JoystickNumHats(joystick));
SDL_JoystickClose(joystick);
} else {
printf("Failed to open joystick %d: %s\n", i, SDL_GetError());
}
}
printf("\nPress Enter to exit...");
getchar();
SDL_Quit();
return 0;
}
|
Beta Was this translation helpful? Give feedback.
-
OK i think this might be a regression caused by libsdl-org/SDL@63aff8e which was released in SDL2-2.30.9+. SDL2-2.30.8 works ok and the xbox controller is found. So I need to raised an issue with the SDL project The PS5 controller issue was a separate issue can was fixed with a repairing. |
Beta Was this translation helpful? Give feedback.
-
I'm running mame 0.272 from macos homebrew on MacOS 15.2 (24C101) and I can't get my gamepads detected. I'm testing with both a bluetooth PS5 controller and a 8bitdo M30.
The game controllers are detected with the SDL2 gamepad tester tool and shows up in the MacOS system settings.
I've tried setting joystickprovider to auto, sdlgame, and sdljoy and still not luck.
Verbose output from launching mame with
mame mk2 -window -joystick -verbose
is here: https://gist.github.com/palmerj/f87f19c6b3dfe479f633397d4fa67c23mame.ini Config is here: https://gist.github.com/palmerj/689c521192e06458c90340bc9b0d913c
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions