Timodor
October 23, 2017, 10:15am
1
I can’t seem to get Xbox360 Controller to Work or JoyStick on Android.
Doesn’t seem to detect my FlightSim JoyStick or my New Xbox 360 PC/XBOX360 Controller.
while ( SDL_PollEvent(&event) )
{
if (event.type == SDL_JOYDEVICEADDED)
{
//CONTROLLERDEVICEADDED
bJoy = true;
}
DJLink
October 23, 2017, 11:28am
2
just for double checking, did you added the proper flag on SDL_Init?
SDL_INIT_GAMECONTROLLER should do the trick
Timodor
October 23, 2017, 11:53am
3
I did all. Init All.
I think the issue is Drivers Support on the Android. Since It Blinks.I have three devices, Tablet, HTC Phone, and Tv Media Center running Android. Tv Media Center Worked Straight Away, SDL 2.0 should be able to detect on that 1.
How does event.caxis? Work what does it return? Vector?
if (event.type == SDL_CONTROLLERAXISMOTION)
{
event.caxis.
}
Timodor
October 23, 2017, 11:58am
4
caxis would be up down, left, right. I need to use the Hats. Left and the Right, so little documentation…ahh
DJLink
October 23, 2017, 12:12pm
5
as for caxis I’ve been using it like this
float axis_value = event.caxis.value;
if (event.caxis.axis==SDL_CONTROLLER_AXIS_LEFTX )
{
//do stuff
}
else //SDL_CONTROLLER_AXIS_LEFTY etc etc
I’m running PES2016, it’s coming up as DirectInput XBOX360 for Windows. Anyone got Xbox 360 Wired USB Successful with Android using SDL 2.0?