Skip to content

Commit dd464af

Browse files
committed
Remove useless code and misleading comment
Time-full-steer is always applied not matter the input device, so code that was meant to help not apply it is pointless
1 parent d19f4c1 commit dd464af

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/input/device_config.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ class DeviceConfig : public NoCopy
103103
virtual bool load(const XMLNode *config);
104104

105105
// ------------------------------------------------------------------------
106-
/** Returns true if this device has analog axis, so that steering values
107-
* will not be affected by time-full-steer delays. */
106+
/** Returns true if this device has an analog axis. */
108107
virtual bool isAnalog(Input::InputType type, int id) const { return false;}
109108
// ------------------------------------------------------------------------
110109
/** Returns true if this device should desensitize its input at values

src/input/gamepad_device.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,6 @@ bool GamePadDevice::processAndMapInput(Input::InputType type, const int id,
146146
{
147147
if (!m_configuration->isEnabled()) return false;
148148

149-
// A digital input value is 32767 or -32768 (which then triggers
150-
// time-full-steer to be used to adjust actual steering values.
151-
// To prevent this delay for analog gamesticks, make sure that
152-
// 32767/-32768 are never used.
153-
if(m_configuration->isAnalog(type, id))
154-
{
155-
if(*value==32767)
156-
*value = 32766;
157-
else if(*value==-32768)
158-
*value = -32767;
159-
}
160-
161149
// Desensitizing means to map an input in the range x in [0,1] to
162150
// x^2. This results in changes close to 0 to have less impact
163151
// (less sensitive).

0 commit comments

Comments
 (0)