summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/input.cpp
diff options
context:
space:
mode:
author Branimir Karadžić <branimirkaradzic@gmail.com>2016-04-27 17:57:45 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-27 17:57:45 +0200
commit94c7dd996bfb9123425c87f2d149018d371dded7 (patch)
tree3ec39fc58485a796905539867280c0f8ae13cf65 /3rdparty/bgfx/examples/common/entry/input.cpp
parent29d7699569f10ce9077cfebe4e7045eb5226f4ff (diff)
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/input.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/entry/input.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/input.cpp b/3rdparty/bgfx/examples/common/entry/input.cpp
index bb9925990b0..b63e0ea6d6d 100644
--- a/3rdparty/bgfx/examples/common/entry/input.cpp
+++ b/3rdparty/bgfx/examples/common/entry/input.cpp
@@ -16,9 +16,9 @@
#include <tinystl/unordered_map.h>
namespace stl = tinystl;
-struct Mouse
+struct InputMouse
{
- Mouse()
+ InputMouse()
: m_width(1280)
, m_height(720)
, m_wheelDelta(120)
@@ -69,10 +69,10 @@ struct Mouse
bool m_lock;
};
-struct Keyboard
+struct InputKeyboard
{
- Keyboard()
- : m_ring(BX_COUNTOF(m_char) )
+ 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<stl::string, const InputBinding*> InputBindingMap;
InputBindingMap m_inputBindingsMap;
- Mouse m_mouse;
- Keyboard m_keyboard;
+ InputKeyboard m_keyboard;
+ InputMouse m_mouse;
Gamepad m_gamepad[ENTRY_CONFIG_MAX_GAMEPADS];
};