Explorar el Código

input: fix a very old bug in input handling that would miss some keys.

legacy
Sam Hocevar hace 5 años
padre
commit
f2d7fa0549
Se han modificado 2 ficheros con 3 adiciones y 4 borrados
  1. +3
    -3
      src/ui/input.cpp
  2. +0
    -1
      src/ui/keys.inc

+ 3
- 3
src/ui/input.cpp Ver fichero

@@ -93,7 +93,7 @@ void InputDeviceInternal::AddKey(int index, const char* name)

while (index >= (int)m_key_names.size())
{
m_key_names.push_back(name);
m_key_names.push_back("");
m_keys.push_back(false);
}

@@ -107,7 +107,7 @@ void InputDeviceInternal::AddAxis(int index, const char* name, float sensitivity

while (index >= (int)m_axis_names.size())
{
m_axis_names.push_back(name);
m_axis_names.push_back("");
m_axis.push(0.0f, 1.0f);
}

@@ -123,7 +123,7 @@ void InputDeviceInternal::AddCursor(int index, const char* name)

while (index >= (int)m_cursor_names.size())
{
m_cursor_names.push_back(name);
m_cursor_names.push_back("");
m_cursors.push(vec2::zero, ivec2::zero);
}



+ 0
- 1
src/ui/keys.inc Ver fichero

@@ -22,7 +22,6 @@ _SC(0, "", Unknown)

/* Usage page 0x07 */

_SC(3, "", Whatever) // FIXME: if this isn’t here, we can’t bind key A; WTF?
_SC(4, "A", A)
_SC(5, "B", B)
_SC(6, "C", C)


Cargando…
Cancelar
Guardar