Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / I don't understand GetRawJoystickPOV( index, pov )

Author
Message
Xaby
FPSC Reloaded TGC Backer
16
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 13th Jul 2019 18:41 Edited at: 13th Jul 2019 18:43
Hello guys,

This is my code:


I figured out, that POV gets more or less the degree ° of the position from the coolie hat. So 0° is UP, 90 is RIGHT, but is saved as 9000, so all angles multiplied by 100.
It works fine. But I have a problem, if my Gamepad or Joystick does not have a coolie hat. Because it would not return -1 or something like that, but 0 (ZERO). So I will get UP as a result.
I can try it via the Joystick-Name but Bluetooth-Controller are registered in Windows, but could be off.
It works fine, if my gamepad has a cooli had and is wired or on. Than I will get a -1 if no direction is pushed.



And getting the Joystick-Name does not work under Android and is not complete, because some different gamepads could share the same generic names.

So how can I implement the coolie hat? Why I need it in the first place? On some gamepads the D-pad acts like a JoystickY and JoystickX and on some gamepads the D-pad is a coolie had and on some the D-pad are 4 or 8 seperate buttons.

But I have to test the coolie hat for that and if this specific joystick does not have one, I want to get a -1 and not a 0.

Or is there another chance, to proof, if there is a coolie had? Maybe my approach is completly wrong. Thanks for help.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 17th Jul 2019 04:03
This is why Microsoft Developed the XINPUT Standard in the first place... as the majority of Developers (at the time) would instead of choosing to support Gravis / Logitech / Microsoft / etc. Standards (as there were like 3 Main, with a dozen 3rd Party) … they'd simply not support ANY Controller or Joystick.
The same is true in regards to Force Feed Back approaches.

Because you'd ALWAYS have to get the name of the Controller / Joystick, to then figure out which direction the Axis were... what the Input Limitations were... what the FFB Triggers were... etc.
Frankly it was a mess that just wasn't worth the hassle; so most Developers just didn't.
And the thing is you'd think this would've been OBVIOUSLY given a Decade(ish) before hand we'd already been through such with Mice., which again Microsoft had to step with a Standardised "Microsoft" Mouse; and the same is true with Standardised "Microsoft" Keyboards... standards that remain common place to this day.

But these are things that Google (Android), Linux, Apple iOS / MacOSX… just don't seem to have learnt are necessary evils; because if you allow Hardware Manufactures complete freedom, then what they do is create half-a-dozen approaches to achieve identical things that are completely incompatible with each other for no dang reason beyond trying to control the standards themselves. This only works if you absolutely dominate a platform.

Now as a Developer it's somewhat YOUR choice how to proceed with support going forward.
Do you do the extra work of supporting all the individual approaches via Device Names., or do you simply support the Standardised Devices., or say "Bollocks to that noise" and not support any of them.

Login to post a reply

Server time is: 2024-03-29 14:29:08
Your offset time is: 2024-03-29 14:29:08