-
June 26th, 2013, 07:09 AM
#1
Using Raw Input for joysticks, multiple axes, and deadzones
I'm currently using Raw Input to get joypad/stick information. At the beginning of my application I cache all of these devices, and the number of axes they each have (using HidP_GetValueCaps(), HidP_GetUsageValue() e.t.c). For each axis my game engine can apply a deadzone, however this means that if we have 2 axes on one analog stick then we get a squared deadzone. In order to calculate a circular deadzone we must know which axes lie on a single stick (e.g. axes 0 and 1 on an XBox 360 controller belong to the left analog stick) before using some simple trig to work it out. Is there anything in Raw Input that tells us this?
-
June 26th, 2013, 08:28 AM
#2
Re: Using Raw Input for joysticks, multiple axes, and deadzones
Originally Posted by Rajveer86
I'm currently using Raw Input to get joypad/stick information. At the beginning of my application I cache all of these devices, and the number of axes they each have (using HidP_GetValueCaps(), HidP_GetUsageValue() e.t.c). For each axis my game engine can apply a deadzone, however this means that if we have 2 axes on one analog stick then we get a squared deadzone. In order to calculate a circular deadzone we must know which axes lie on a single stick (e.g. axes 0 and 1 on an XBox 360 controller belong to the left analog stick) before using some simple trig to work it out. Is there anything in Raw Input that tells us this?
What's your Visual C++ question?
-
June 26th, 2013, 09:50 AM
#3
Re: Using Raw Input for joysticks, multiple axes, and deadzones
Sorry, wrong forum. Can a mod move this to "C++ and WinAPI" (I think that's the appropriate forum)?
-
June 26th, 2013, 11:58 AM
#4
Re: Using Raw Input for joysticks, multiple axes, and deadzones
Originally Posted by Rajveer86
Sorry, wrong forum. Can a mod move this to "C++ and WinAPI" (I think that's the appropriate forum)?
Rather than "think" or guess you should have just better read what is which Forum is for!
For example:
Forum: Visual C++ Programming
Ask questions about Windows programming with Visual C++ and help others by answering their questions.
.....
Forum: C++ and WinAPI
Discuss Windows API related issues using C++ (and Visual C++). This is a non-MFC forum.
So both Forums are to duscuss the programming issues using or related to C++ (and Visual C++).
Then I would repeat the question GCDEF already asked:
What's your (Visual) C++ question?
Victor Nijegorodov
-
June 26th, 2013, 06:05 PM
#5
Re: Using Raw Input for joysticks, multiple axes, and deadzones
Ok it seems to be the linkCollection variable belonging to the HIDP_VALUE_CAPS struct. The problem now is that during testing, only the XBox 360 controller conformed to separating it's axes into different link collections (both axes on the left stick are part of collection 1, the right stick part of collection 2 e.t.c). My Saitek X52 has all axes as part of collection 1, and a few others controllers I tried do this too.
-
November 26th, 2013, 05:53 AM
#6
Re: Using Raw Input for joysticks, multiple axes, and deadzones
Well, both HidP_GetValueCaps() function and HIDP_VALUE_CAPS struct belong to Windows Drivers section in MSDN.
Perhaps, you should ask in the Driver Development forum?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|