Implement Dominik's patch.

Someone on Linux needs to test if possible.
This will be reverted if it's proven it doesn't work.
This commit is contained in:
Jason Felds
2011-04-02 16:37:45 -04:00
parent 4f79fe3e73
commit 7e747c6d65
@@ -398,7 +398,7 @@ void InputHandler_Linux_Event::InputThread()
DeviceButton neg = g_apEventDevices[i]->aiAbsMappingLow[event.code];
DeviceButton pos = g_apEventDevices[i]->aiAbsMappingHigh[event.code];
float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[i], (float) g_apEventDevices[i]->aiAbsMax[i], -1.0f, 1.0f );
float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[event.code], (float) g_apEventDevices[i]->aiAbsMax[event.code], -1.0f, 1.0f );
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, max(-l,0), now) );
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, max(+l,0), now) );
break;