Reverse the analog Y for everyone.

Verified XInput is still happy this way.
This commit is contained in:
Unknown W. Brackets 2012-12-29 13:01:10 -08:00
parent 1d9f27f3e3
commit 8c98c7b141
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ void __CtrlSetAnalog(float x, float y)
if (x < -1.0f) x = -1.0f;
if (y < -1.0f) y = -1.0f;
ctrlCurrent.analog[0] = (u8)(x * 127.f + 128.f);
ctrlCurrent.analog[1] = (u8)(y * 127.f + 128.f);
ctrlCurrent.analog[1] = (u8)(-y * 127.f + 128.f);
}
int __CtrlReadSingleBuffer(u32 ctrlDataPtr, bool negative)

View File

@ -41,7 +41,7 @@ int XinputDevice::UpdateState() {
if ( dwResult == ERROR_SUCCESS ) {
this->ApplyDiff(state);
Stick left = NormalizedDeadzoneFilter(state);
__CtrlSetAnalog(left.x, -left.y);
__CtrlSetAnalog(left.x, left.y);
this->prevState = state;
this->check_delay = 0;
return 0;