Moved AxisFix to GamePreferences so that the preference exists on all platforms and doesn't cause a crash on the Advanced Input Options screen on OS X. Preference does nothing on OS X for now.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include <linux/input.h>
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( LinuxEvent, Linux_Event );
|
||||
static Preference<bool> g_bAxisFix( "AxisFix", false );
|
||||
|
||||
static RString BustypeToString( int iBus )
|
||||
{
|
||||
@@ -416,7 +415,7 @@ void InputHandler_Linux_Event::InputThread()
|
||||
DeviceButton pos = g_apEventDevices[i]->aiAbsMappingHigh[event.code];
|
||||
|
||||
float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[event.code], (float) g_apEventDevices[i]->aiAbsMax[event.code], -1.0f, 1.0f );
|
||||
if (g_bAxisFix)
|
||||
if (GamePreferences::m_AxisFix)
|
||||
{
|
||||
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, (l < -0.5)||((l > 0.0001)&&(l < 0.5)), now) ); //Up if between 0.0001 and 0.5 or if less than -0.5
|
||||
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, (l > 0.5)||((l > 0.0001)&&(l < 0.5)) , now) ); //Down if between 0.0001 and 0.5 or if more than 0.5
|
||||
|
||||
Reference in New Issue
Block a user