pboy0922 / x360ce

Automatically exported from code.google.com/p/x360ce
1 stars 0 forks source link

Fix: Axis not inverted when inverted axis is mapped #1058

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Proposed fix attached.

Steps will reproduce the problem?
1. Assign a normal axis to an analog stick
2. Save and restart x360ce
3. Move stick around and observe xinput values
4. Assign the same axis but inverted
5. Save and restart x360ce
6. Move stick around and notice no difference in xinput values

What is the expected output? What do you see instead?
Stick should produce inverted xinput values when moved

What versions of x360ce and Windows are you using?
x360ce r1081, Windows 7

What gamepad do you use? On what drivers version?
Logitech Rumblepad 2

Original issue reported on code.google.com by ratanakv...@gmail.com on 7 Dec 2014 at 4:41

Attachments:

GoogleCodeExporter commented 9 years ago
I want to change scaling completely but I'm not so good with math :(
IMO, better approach is to scale it at finer granularity in DirectInput then 
rescale, because DirectInput devices can use full LONG size.

If you want to help, here is DirectInput scaling code: 
https://code.google.com/p/x360ce/source/browse/trunk/x360ce/x360ce/Controller.cp
p#56

Original comment by tapcio on 7 Dec 2014 at 4:53

GoogleCodeExporter commented 9 years ago
Whoops. There was a mistake in the first diff. The 'negative' variable should 
have been set after the axis inversion. I've attached v2 of the diff that fixes 
this.

About the scaling, I'm not really sure what you mean by that. I may be able to 
help if you explain a little bit more about what you want.

Also, are you OK with patches being submitted through the issue tracker?

Original comment by ratanakv...@gmail.com on 7 Dec 2014 at 9:35

Attachments:

GoogleCodeExporter commented 9 years ago
Currently it's ok, but if you want help us more then I will give you direct 
access to SVN.

Original comment by tapcio on 7 Dec 2014 at 10:52

GoogleCodeExporter commented 9 years ago
If I could have svn access, that would be nice. I've been working with axis and 
deadzone stuff because they were acting weird and I found some small bugs here 
and there that might not warrant issue tickets.

Original comment by ratanakv...@gmail.com on 7 Dec 2014 at 11:08

GoogleCodeExporter commented 9 years ago
So, welcome, we appreciate any help :D

Original comment by tapcio on 7 Dec 2014 at 11:13