From 5737270dbc64223505f2e2c3b32d7c98d25c7e69 Mon Sep 17 00:00:00 2001 From: Dario Manesku Date: Fri, 15 Apr 2016 12:07:27 +0200 Subject: [PATCH] Resolving some name collision. Mouse constructor was not being called. With this rename it works as expected. --- examples/common/entry/input.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/common/entry/input.cpp b/examples/common/entry/input.cpp index 5e67f23c1..b63e0ea6d 100644 --- a/examples/common/entry/input.cpp +++ b/examples/common/entry/input.cpp @@ -16,9 +16,9 @@ #include namespace stl = tinystl; -struct Mouse +struct InputMouse { - Mouse() + InputMouse() : m_width(1280) , m_height(720) , m_wheelDelta(120) @@ -69,9 +69,9 @@ struct Mouse bool m_lock; }; -struct Keyboard +struct InputKeyboard { - Keyboard() + InputKeyboard() : m_ring(BX_COUNTOF(m_char)-4) { } @@ -215,7 +215,7 @@ struct Input for (const InputBinding* binding = _bindings; binding->m_key != entry::Key::None; ++binding) { uint8_t modifiers; - bool down = Keyboard::decodeKeyState(m_keyboard.m_key[binding->m_key], modifiers); + bool down = InputKeyboard::decodeKeyState(m_keyboard.m_key[binding->m_key], modifiers); if (binding->m_flags == 1) { @@ -278,8 +278,8 @@ struct Input typedef stl::unordered_map InputBindingMap; InputBindingMap m_inputBindingsMap; - Mouse m_mouse; - Keyboard m_keyboard; + InputKeyboard m_keyboard; + InputMouse m_mouse; Gamepad m_gamepad[ENTRY_CONFIG_MAX_GAMEPADS]; };