What's new

howto Invert the axis

azzamite

black beast of AAAAaaaahhhh!!!
Hi there, I'm new around here
Is there a way to invert the Y axis of the analog stick?

I have an xbox pad and it sends a negative value while I press
up the left analog stick, thereof, playing the character runs
backwards instead of fordward

and tanks for making the emu work for x86_64
 

Richard42

Emulator Developer
It looks like there's currently no way to do this in the config files with the blight input plugin, but I can tell you how to hack it. In the blight_input/plugin.c file, about line 815 there is a clause which looks like this:

if( b == 0 )
controller[Control].buttons.stick_x = -axis_val;
else
controller[Control].buttons.stick_y = axis_val;

If you change the "axis_val" in the last line to "-axis_val", then recompile the plugin you will get the effect you desire. If you don't know how to do this, tell me which version you are running (64 bit I presume) and I can hack it together real quick and post the plugin here.
 
OP
A

azzamite

black beast of AAAAaaaahhhh!!!
weird, I had to change the first one instead '(~_^)'

if( b == 0 )
controller[Control].buttons.stick_x = axis_val;
else
controller[Control].buttons.stick_y = axis_val;

but now it works, tanks

-NOW SOLDIERS, STOP FOOLING ON THE NET AND GO BACK TO PLAY
~YES SIR!
 

Top