Home
Products
Community
Manuals
Contact
Login or Signup

Joysticks not detected under Ubuntu Dapper?

Miscellaneous Forums/Linux Discussion/Joysticks not detected under Ubuntu Dapper?

salric(Posted 3 years ago) #1
Hi all,

I've managed to get my Xbox 360 joypad running under ubuntu, it is recognised under /dev/input/js0 by jscalibrator.

I'm wondering why Blitzmax fails to recognise the device? Joycount() returns 0

Can anyone help me with this issue?

Kind Regards,
-R


skidracer(Posted 3 years ago) #2
try changing the get joy routine in pub.mod/freejoy.mod/freejoy.linux.c[73] to:
	sprintf(fname,"/dev/js%d",n);
	fd=open(fname,O_RDONLY);
	if (fd==-1) {
		sprintf(fname,"/dev/input/js%d",n);
		fd=open(fname,O_RDONLY);
		if (fd==-1) return 0;
	}
	j=(linuxjoy*)calloc(1,sizeof(struct linuxjoy));



salric(Posted 3 years ago) #3
Thanks very much; the power supply in my Linux box just died, so I'll try this when I get it replaced tomorrow and let you know how I go...


salric(Posted 3 years ago) #4
Fantasic, it works perfectly now - thank you very much for your help!