01-11-2013, 08:54 PM
To whomever of greater knowledge than myself this may pertain to,
I am running Xonotic 0.6.0autobuild(if that means anything) on a 2011 Mac Mini with OSX 10.7.5.
I have an AX.1 afterglow xbox360 controller (wired, USB).
This controller is operating on my system through the "xbox360controller" driver download for Mac.
It works, all inputs are registered.
With adjustments, this controller works with the aforementioned version of Xonotic, and quite well.
MY CONCERN:
The trigger buttons on the back of the xbox360 controller do not register with Xonotic. Speaking mechanics, these buttons are being registered by the driver installed on my Mac as gradated inputs...they are NOT cut and dry on/off-state driven (I dont think this is the problem).
I did some research on the internet, and within the source code for Xonotic I came across a file that handles joystick inputs. (This file is located at: source->darkplaces->vid_shared.c)
Within "vid_shared.c" exists the following lines:
//#include <XInput.h>
#define XINPUT_GAMEPAD_DPAD_UP 0x0001
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004
#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008
#define XINPUT_GAMEPAD_START 0x0010
#define XINPUT_GAMEPAD_BACK 0x0020
#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040
#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080
#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100
#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200
#define XINPUT_GAMEPAD_A 0x1000
#define XINPUT_GAMEPAD_B 0x2000
#define XINPUT_GAMEPAD_X 0x4000
#define XINPUT_GAMEPAD_Y 0x8000
#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849
#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30
#define XUSER_INDEX_ANY 0x000000FF
My belief is that Xonotic has not been coded to support enough joystick inputs to recognize the triggers of my xbox360 controller.
I believe that additional lines such as "LEFT_SHOULDER_2" and "RIGHT_SHOULDER_2" need to be added to the above listed code.
THE QUESTIONS:
If this is an accurate assessment of the situation, how can I discover the associated addresses (i.e 0x0100) of my xbox trigger buttons?
How can I incorporate new code myself into the above lines?
How do I compile the adjusted code once Im done (Im running on a Mac)?
If I have totally missed the mark, who would I contact about this issue so I get results (either through guidance or implementation in future versions)?
Thank you for any assistance!
I am running Xonotic 0.6.0autobuild(if that means anything) on a 2011 Mac Mini with OSX 10.7.5.
I have an AX.1 afterglow xbox360 controller (wired, USB).
This controller is operating on my system through the "xbox360controller" driver download for Mac.
It works, all inputs are registered.
With adjustments, this controller works with the aforementioned version of Xonotic, and quite well.
MY CONCERN:
The trigger buttons on the back of the xbox360 controller do not register with Xonotic. Speaking mechanics, these buttons are being registered by the driver installed on my Mac as gradated inputs...they are NOT cut and dry on/off-state driven (I dont think this is the problem).
I did some research on the internet, and within the source code for Xonotic I came across a file that handles joystick inputs. (This file is located at: source->darkplaces->vid_shared.c)
Within "vid_shared.c" exists the following lines:
//#include <XInput.h>
#define XINPUT_GAMEPAD_DPAD_UP 0x0001
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004
#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008
#define XINPUT_GAMEPAD_START 0x0010
#define XINPUT_GAMEPAD_BACK 0x0020
#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040
#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080
#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100
#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200
#define XINPUT_GAMEPAD_A 0x1000
#define XINPUT_GAMEPAD_B 0x2000
#define XINPUT_GAMEPAD_X 0x4000
#define XINPUT_GAMEPAD_Y 0x8000
#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849
#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30
#define XUSER_INDEX_ANY 0x000000FF
My belief is that Xonotic has not been coded to support enough joystick inputs to recognize the triggers of my xbox360 controller.
I believe that additional lines such as "LEFT_SHOULDER_2" and "RIGHT_SHOULDER_2" need to be added to the above listed code.
THE QUESTIONS:
If this is an accurate assessment of the situation, how can I discover the associated addresses (i.e 0x0100) of my xbox trigger buttons?
How can I incorporate new code myself into the above lines?
How do I compile the adjusted code once Im done (Im running on a Mac)?
If I have totally missed the mark, who would I contact about this issue so I get results (either through guidance or implementation in future versions)?
Thank you for any assistance!