From 84836a21ffc3e4c73be887c3a18fc85097fb7f8e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 19 Feb 2019 00:05:19 +0100 Subject: [PATCH] input: fix an apparent bug in key/axis name handling. --- src/input/input.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/input/input.cpp b/src/input/input.cpp index 81c60a96..45418a10 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -60,7 +60,7 @@ void InputDeviceInternal::AddKey(int index, const char* name) m_keys.push(false); } - m_keynames.last() = name; + m_keynames[index] = name; } void InputDeviceInternal::AddAxis(int index, const char* name, float sensitivity) @@ -74,9 +74,9 @@ void InputDeviceInternal::AddAxis(int index, const char* name, float sensitivity m_axis.push(0.0f, 1.0f); } - m_axisnames.last() = name; - m_axis.last().m1 = 0.0f; - m_axis.last().m2 = sensitivity; + m_axisnames[index] = name; + m_axis[index].m1 = 0.0f; + m_axis[index].m2 = sensitivity; } void InputDeviceInternal::AddCursor(int index, const char* name) @@ -90,7 +90,7 @@ void InputDeviceInternal::AddCursor(int index, const char* name) m_cursors.push(vec2::zero, ivec2::zero); } - m_cursornames.last() = name; + m_cursornames[index] = name; } InputDeviceInternal* InputDeviceInternal::CreateStandardKeyboard()