How to get input from joystick with more than 12 buttons?

Posted By: painkiller

How to get input from joystick with more than 12 buttons? - 05/01/10 22:27

Hi, that is my question. I've a Steering Wheel with more than 12 buttons and I need to use them, how can I do it?
Posted By: Lukas

Re: How to get input from joystick with more than 12 buttons? - 05/01/10 22:44

I'm afraid, the engine can't do that, so you have to use the Winapi. This link might help:
http://msdn.microsoft.com/en-us/library/ms709377
Posted By: painkiller

Re: How to get input from joystick with more than 12 buttons? - 05/01/10 23:24

I think I've found the solution! I can get input from any button with joy_buttons and joy2_buttons, here's the page from GS manual wich explains how to use it: http://www.conitec.net/beta/joy_buttons.htm
Posted By: Keebo

Re: How to get input from joystick with more than 12 buttons? - 05/02/10 23:07

Does this mean that GS7/Lite C only supports 2 joysticks natively without resorting to outside apps?

I would really like to have a steering wheel/accelerator/brake and two joysticks for a current simulator training project I am working on without the extra work needed for other apps.
Posted By: painkiller

Re: How to get input from joystick with more than 12 buttons? - 05/04/10 18:37

yes, i think you can only get input from two joysticks
Posted By: Sub_Game

Re: How to get input from joystick with more than 12 buttons? - 06/23/10 11:51

Does anyone know how to implement the point of view hat on a joystick?
Posted By: Rei_Ayanami

Re: How to get input from joystick with more than 12 buttons? - 06/23/10 11:54

point of view hat:

joy_hat

and

joy2_hat
Posted By: Sub_Game

Re: How to get input from joystick with more than 12 buttons? - 06/23/10 12:17

Thanks - works perfectly!

Code:
if(joy_hat == -1)
{	cam_glance_set_pan = 0;
	cam_glance_set_tilt = 0;
}
else if(joy_hat == 0) cam_glance_set_tilt = -30;
else if(joy_hat == 180) cam_glance_set_tilt = 40;
else if(joy_hat == 270)	cam_glance_set_pan = -90;
else cam_glance_set_pan = joy_hat;


© 2024 lite-C Forums