I'm trying to get one of the generic USB gamepads (Buffalo, Kiwitata, etc) to work on the Raspberry Pi. The DPad works if you treat it as an analog stick and the X and Y buttons register along with the shoulder buttons.
The problem is the A and B buttons don't register at all. They work fine when using jstest-gtk and work fine in all my SDL programs.
This code will show which buttons register. On a Windows PC it registers all buttons. It's just on the Raspberry Pi that the A and B buttons don't work.
The problem is the A and B buttons don't register at all. They work fine when using jstest-gtk and work fine in all my SDL programs.
This code will show which buttons register. On a Windows PC it registers all buttons. It's just on the Raspberry Pi that the A and B buttons don't work.
GML:
var gp_num = gamepad_get_device_count();
var b;
for (var i = 0; i < gp_num; i++;)
{
if gamepad_is_connected(i)
{
var cnt;
cnt = gamepad_button_count(i);
for(var j=cnt; j>=0; j--;)
{
b = gamepad_button_check(i, j);
if (b)
{
show_debug_message(string(cnt) + ":" + string(i) + ":" + string(j));
}
}
}
}