What's new

Change N-Rage XIpunt deadzone for the C-Buttons

Legiaoday

New member
Hi,

I'm using the latest version of the N-Rage plugin (2.5.3.9999) and as the title says I would like to change the deadzone for the C-buttons only.
Currently, N-Rage XInput doesn't allow the user to change the deadzone of one stick alone (there's a deadzone slider on the 'Devices' tab but it doesn't seem to apply to the C-Buttons), and the default deadzone set for the C-Buttons is too high for FPS games with control style 1.2 (C-Buttons walk forward/backward and strafe left/right).

I know a little bit of programming, however I'm not very familiar with C++ and PJ64 development. So, for those familiar with Project64 development I would like to ask if someone could point out for me which .cpp/.h file(s) and lines of code in the GitHub open source project allow me to change the default deadzone for the C-Buttons. From there I can mess around with constants' values (I guess they are constants, but idk) and build the 'PJ64_NRage.dll' on my own.
 
Last edited:
OP
L

Legiaoday

New member
Alright, I decide to give it shot and I found the constant that mainly determines the deadzone of a stick when assigned to the C-Buttons.

I don't think anyone (aside from myself) will ever need to change this, but if anyone is interested, you just need to change the value of #define BUTTON_ANALOG_VALUE on XInputController.h. The default value is 60, but lowering it to 10 did the trick for me.
A slider would still be a better option, but I'm no good with GUIs.
 
OP
L

Legiaoday

New member
Legiaoday, can you share your compiled .dll?

Download link.

Sorry it took me so long to reply, the only reason I came back here is because I 'lost' the compiled dll and the source code, and I forgot what I did to fix the deadzone :facepalm:
Anyway, I recompiled it. The dll in the link above has the BUTTON_ANALOG_VALUE set to 10. I tested it with Perfect Dark and it worked like a charm.

If you think 10 is too low, here are some more DLLs compiled with other values:

Deadzone C-Buttons 15
Deadzone C-Buttons 25
Deadzone C-Buttons 40
Deadzone C-Buttons 50
Deadzone C-Buttons 60
 
Last edited:

Top