When mapping to an axis, center when both pressed.

Fixes #2860.
This commit is contained in:
Unknown W. Brackets
2013-07-20 12:11:35 -07:00
parent 51adb8c64f
commit 13f6ca0019
3 changed files with 33 additions and 18 deletions

View File

@@ -149,8 +149,8 @@ void __CtrlPeekAnalog(int stick, float *x, float *y)
{
std::lock_guard<std::recursive_mutex> guard(ctrlMutex);
*x = (ctrlCurrent.analog[stick][0] - 127.5f) / 127.5f;
*y = -(ctrlCurrent.analog[stick][1] - 127.5f) / 127.5f;
*x = (ctrlCurrent.analog[stick][CTRL_ANALOG_X] - 127.5f) / 127.5f;
*y = -(ctrlCurrent.analog[stick][CTRL_ANALOG_Y] - 127.5f) / 127.5f;
}